Android app showing incompatible after publishing - android

I have just tried to publish my first app but when it finally went through it was shown as being incompatible to multiple devices, I have been searching and every fix that I have come across has done nothing for me. Any suggestions?
Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.customledsupply.ledaudit" >
<uses-feature
android:name="android.hardware.camera2"
android:required="true" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="#drawable/cls"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainPage"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".OldLocation"
android:label="#string/title_activity_old_location" >
</activity>
<activity
android:name=".NewLocation"
android:label="#string/title_activity_new_location" >
</activity>
<activity
android:name=".RoomDescription"
android:label="#string/title_activity_room_description" >
</activity>
<activity
android:name=".FixtureDescription"
android:label="#string/title_activity_fixture_description" >
</activity>
<activity
android:name=".RoomList"
android:label="#string/title_activity_room_list" >
</activity>
<activity
android:name=".Summary"
android:label="#string/title_activity_summary" >
</activity>
</application>
</manifest>
Gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.customledsupply.ledaudit"
minSdkVersion 19
targetSdkVersion 22
versionCode 2
versionName "2.0"
}
signingConfigs {
release {
storeFile file("myreleasekey.keystore")
storePassword "CLS"
keyAlias "Custom LED Supply"
keyPassword "CLS"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'io.realm:realm-android:0.82.0'
}

Most probably, the potential cause is the following:
<uses-feature
android:name="android.hardware.camera2"
android:required="true" />
If any device doesn't have this feature, it wont even show it on the play store for them and will be in your list of incompatible devices. If you want to make it optional, use android:required="false" instead. By doing thing, you might be able to get around the issue.
Otherwise if you give examples of the incompatible devices, we might be able to narrow down the issue more. Hope it helps.

In your AppManifest.xml, you added a feature that is not be supported by all devices which is android:name="android.hardware.camera2". It only supports API 21+. However, you can set the required attribute to false, but that will cause issues for your app.
Reference Link: https://developer.android.com/reference/android/hardware/camera2/package-summary.html

Related

Supported Android Devices = zero

My app can't be found when someone looks for it from their google play app on their Android phone. (shows find when searched from browser). This is because Google Play says my app supports "0 devices".
The support chat person at Google play says this is the reason:
"Your app is not compatible with certain devices due to a conflict in your app’s manifest with the following: no supported native platform:
armeabi, armeabi-v7a, and missing device features: android.hardware.faketouch, android.hardware.screen.portrait"
I can't figure out what the heck that means.
My manifest file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.deanblakely.SafeTalk"
android:installLocation="preferExternal"
android:versionCode="30"
android:versionName="1.06 " >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="25" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="false" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="${applicationId}.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="false"
android:xlargeScreens="true" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<!--android:theme="#android:style/Theme.NoTitleBar" -->
<activity android:name="SplashActivity"
android:label="#string/app_name"
android:theme="#style/SplashTheme">
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="MainActivity"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
android:launchMode="singleTask"
android:theme="#style/AppTheme.NoActionBar"
>
</activity>
<receiver
android:name="com.deanblakely.SafeTalk.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.deanblakely.SafeTalk" />
</intent-filter>
</receiver>
<service android:name="com.deanblakely.SafeTalk.GcmIntentService" />
</application>
</manifest>
My gradle file is as follows:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
useLibrary 'org.apache.http.legacy' //httpClient not supported in 23.
lintOptions { disable 'MissingTranslation' }
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
}
signingConfigs {
releaseConfig {
storeFile file("XXXXXXXXXXXXXXXXX");
storePassword ("XXXXXXXXXX");
keyPassword ("XXXXXXXXXX");
keyAlias "XXXXX
}
}
buildTypes {
release {
minifyEnabled false
debuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.releaseConfig
}
debug {
debuggable true
applicationIdSuffix ".debug"
}
}
flavorDimensions "stupidDimensionone"
productFlavors {
scFlavor
{
applicationId 'com.deanblakely.SafeTalk.sc'
dimension "stupidDimensionone"
}
safetalkFlavor
{
applicationId "com.deanblakely.SafeTalk"
dimension "stupidDimensionone"
}
}
}
dependencies {
compile project(':dropboxChooserSDK')
compile files('libs/gson-2.2.4.jar')
compile files('libs/microsoft-translator-java-api-0.6.2-jar-with-dependencies.jar')
compile 'com.android.support:appcompat-v7:25+'
compile 'com.android.support:design:25+'
compile 'com.google.android.gms:play-services-gcm:9.4.0'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
}
This didn't used to be this way. I suppose it is another breaking change. Anyone know what is causing this?
As usual I am answering my own question . . .
I made the following replacement in my gradle . . .
//compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
compile 'commons-io:commons-io:2.6'
I found a post from somebody else that had the same problem. I don't know why it works and neither did the original person with the problem. I think this is either caused by buggy Google Play software and/or a complete lack of documentation.
Usually this problem are about configuration permision or uses feature
In this case looks the problem is like this:
<uses-feature android:name="android.hardware.bluetooth" />
<uses-feature android:name="android.hardware.camera" />
Check the users feature you need to change in the DOCUMENTATION

ActionBar is not being displayed anymore after migration from Eclipse to Android Studio

I recently tried to edit my 4 year old android application in the recently appeared Android Studio 2.3.1.
After importing the code I can launch it on my mobile phone. However the action bar seems to have disappeared. What has gone wrong?
How can I tell android to display the action bar?
I have implemented the action bar activity like this:
public class MainActivity extends ActionBarActivity
My build.gradle looks like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 17
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "de.my.app"
minSdkVersion 8
targetSdkVersion 17
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:18.0.0'
}
I also tried to replace the compile command with something newer one:
compile 'com.android.support:appcompat-v7:25.3.1'
but already the syncing in android studio fails like this, throwing the following error:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library [com.android.support:appcompat-v7:25.3.1] /home/user/.android/build-cache/815cafa5312f1d889eb1134b2184a62b3f88d8a3/output/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="android.support.v7.appcompat" to force usage
I haven't done much android coding in the last 4 years so I assume the ActionBar stuff has changed profoundly but shouldn't there be a way to compile the old code as it is using android studio?
Edit:
This is the manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.myApp.myAppDemo"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/icon_app"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="de.myApp.myAppDemo.Splash"
android:label="#string/app_name"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="de.myApp.myAppDemo.MainActivity"
android:label="#string/app_name"
android:screenOrientation="landscape"
android:theme="#style/Theme.AppCompat.Light">
<intent-filter>
<action android:name="de.myApp.myAppDemo.MAINACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="de.myApp.myAppDemo.PropertiesAssign"
android:label="#string/app_name"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="de.myApp.myAppDemo.PROPERTIESASSIGN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="de.myApp.myAppDemo.PropertiesView"
android:label="#string/app_name"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="de.myApp.myAppDemo.PROPERTIESVIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
Meanwhile I got at least the ActionBar to be displayed. However I had to increase the MinSDK and targetSdkVersion / compileSdkVersion bigly: From 8,17 to 15,23. Moreover I had to look in the SDK-Manager to see which exact version of Android Support Library was installed on my system (23.2.0) and adapt the corresponding line in build.gradle.
apply plugin: 'com.android.application'
android {
compileSdkVersion 23 //->modified
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "de.Geo.geodraw"
minSdkVersion 15 //->modified
targetSdkVersion 23 //->modified
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile "com.android.support:appcompat-v7:23.2.0" //->modified
}
Not sure whether it was relevant or necessary but following this page I also added
allprojects {
repositories {
jcenter()
maven { //->modified
url "https://maven.google.com" //->modified
} //->modified
}
}
in another build.gradle file.
If there is another solution without drastically changing minSdk and targetSdk I will accept that answer.

Why is my Android App unsupported for ALL devices on google play?

I published an Android app on the google play store but it says that it is incompatible with ALL devices:
Why is this? Just before this, I published another app and it really wasn't that much different from this one but it is compatible with almost all devices.
This is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxx.yy" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/app"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- register our ContentProvider -->
<provider
android:name=".data.app"
android:authorities="#string/content_authority"
android:exported="false"
android:syncable="true" />
<activity
android:name=".DetailActivity"
android:label="#string/title_activity_detail"
android:parentActivityName=".FavoritesActivity"
android:launchMode="singleTask">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.xxx.yyy.MainActivity" />
>
</activity>
<activity
android:name=".FavoritesActivity"
android:label="#string/title_activity_favorites"
android:parentActivityName=".MainActivity"
android:launchMode="singleTask">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.xxx.yyy.MainActivity" />
</activity>
</application>
</manifest>
And this is my gradle.build file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.xxx.yy"
minSdkVersion 10
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:support-v4:22.2.0'
compile 'org.json:json:20150729'
compile 'org.apache.directory.studio:org.apache.commons.codec:1.8'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
compile 'com.android.support:design:22.2.0'
}
I'm really lost here because I only have one permission, INTERNET..
I found out the culprit!
It was this line in my gradle file:
compile 'org.apache.directory.studio:org.apache.commons.codec:1.8'
This weird: Native platforms thing was showing up before all because of that gradle dependency!
Which does not make sense for me... I guess I have to find another dependency or something. Could someone explain to me why a dependency like that would cause this to happen?
I removed that line and upon reuploading my APK I now see this:
You appear to have an extra > in your manifest --
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.xxx.yyy.MainActivity" />
> <==== DELETE THIS
</activity>
<activity
Not sure why your even able to make a build with that, but I tested a similar scenario and it made an APK for me. I would guess when you upload the .apk that is messing with google play's parsing for device compatibility.

Play store says my app is supported by 0 devices

I have recently finished building my first android app. I published it to the store today but it says it supports 0 devices. Here is my manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.guessthepicturespazam.guessit" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="נחש את המילה"
android:theme="#style/Theme.AppCompat.NoActionBar" >
<activity
android:name=".MainActivity"
android:configChanges="orientation"
android:label="נחש את המילה"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".GameActivity"
android:configChanges="orientation"
android:label="#string/title_activity_game"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".Splash"
android:configChanges="orientation"
android:label="נחש את המילה"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".StoreActivity"
android:label="#string/title_activity_store" >
</activity>
<activity
android:name=".GameOverActivity"
android:label="#string/title_activity_game_over" >
</activity>
</application>
<supports-screens
android:anyDensity="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:resizeable="true" />
</manifest>
This is my build.grade file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.GuessTheWordZahal.guessit"
minSdkVersion 10
targetSdkVersion 23
versionCode 2
versionName "1.0.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
compile 'com.google.android.gms:play-services-ads:7.8.0'
}
I tried looking this problem up online but I couldn't find a problem similar to mine. Most apps have no supported devices because they use features that are only available in some or in no devices. I just can't figure out what's wrong in mine. I've actually tested this app on my samsung galaxy and it worked fine.
You need to provide supported sdkVersion
<uses-sdk
android:minSdkVersion="minimum(e.g "8")"
android:targetSdkVersion="maximum(e.g "22")" />
if you are using Eclipse then mention your minSdkVersion & maxSdkVersion in your manifest file and if you are using Android Studio then mention these in build.gradle file.
For Eclipse
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.guessthepicturespazam.guessit"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="21"/>
.......................
</manifest>
For Android Studio
edit your build.gradle file like as below
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.guessthepicturespazam.guessit"
minSdkVersion 8
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Note: Version name and Version code is important if you want to update your application in future.
Your manifest is incorrect.
<supports-screens>
is currently placed in application tag but should be moved up, to manifest tag.
Check out manifest structure https://developer.android.com/guide/topics/manifest/manifest-intro.html#filestruct
I suppose play-store parser couldn't find supports-screens information and decided that there is no screen supported. Please, correct manifest and let us know. Very interesting issue.

any suggest? Failure [INSTALL_FAILED_OLDER_SDK]

my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.vladxd.trackingpoint_2"
minSdkVersion 21
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v13:22.0.0'
compile 'com.android.support:support-v4:22.0.0'
compile 'com.google.android.gms:play-services:7.0.0'
}
and here is my Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.vladxd.trackingpoint" >
<!-- To access Google+ APIs: -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.vladxd.trackingpoint.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyB5HcvlWp6AAUBU65Iq7CC_huQi_yK1XG8" />
</application>
</manifest>
Do u have any idea how I can solve it? I've try to find this problem on another post from stackoverflow but all that don't work for me... and I don't know why.
So if u have any idea pls told me :D
Sry for my bad english.
The gradle file sets the build to be minSdk of 21 which is Android 5.0. The error is basically saying that the device you're attempting to install on has an older os.
If go into the device settings -> About Phone there should be an entry that shows your Android Version. That should then line up with the values from http://developer.android.com/reference/android/os/Build.VERSION_CODES.html

Categories

Resources