I've been working on a project for some time now and I pretty much finished and am ready to release it to the play store. I was able to deploy my app through debug mode via the USB cable onto my Samsung s4 phone. Strangely, when I generated the signed apk and released it to the play store, I can't download it on my phone... This makes no sense since I was able to use it when I was testing it... I asked my friends and they experienced the same thing. I looked at my developer console and it says my app is compatible with LITERALLY 0 phones in the market... So I looked it up and I thought maybe my manifest is messed up, so here it is (I'm using android studio btw):
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="XXXX">
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-feature android:name="android.hardware.CAMERA"/>
<application
android:allowBackup="true"
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:name="android.support.multidex.MultiDexApplication"
>
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
<activity
android:name="XXXX"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
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="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
<activity android:name="com.facebook.FacebookActivity"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="#string/app_name" />
<provider android:authorities="com.facebook.app.FacebookContentProviderXXXX"
android:name="com.facebook.FacebookContentProvider"
android:exported="true" />
</application>
</manifest>
So I see no issues in the manifest (maybe someone can correct me on that) and if there were it wouldn't have ran on my phone when I tested the app.
So I use a lot of external libraries for my app, here is the list:
1) facebook api
2) twitter api
3) snapdragon
4) google play service
I also had to use multidex (as you saw in the manifest) because the code exceeded 64k lines of code. Here's how the build.gradle looks like:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "xxxx"
minSdkVersion 16
targetSdkVersion 23
versionCode 3
versionName "1.2"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { java.srcDirs = ['src/main/java', 'libs'] } }
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile 'com.android.support:multidex:1.0.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile('com.twitter.sdk.android:tweet-composer:1.0.2#aar') {
transitive = true;
}
}
I'm totally new with gradle so I'm not sure if it's set up correctly so there maybe issues with the gradle itself or maybe something else. Anyone have any suggestions what I can do?
I changed the camera feature to required false in the manifest and that did the trick. When I uploaded the apk in the developer console it said 8k+ devices supported. Also the manifest was inccorect, when you put the use-features tag make sure to have camera all lowercase not uppercase like I had.
Related
Play Store says "can't install this app try again, and if it still doesn't work, see common ways to fix it".
I have published UPDATE of my different android apps on play store and it got successfully live as usual. But the thing is that on my Google Play Console all apps' new install were ZERO from past 2,3 days.
Manifest AND Build Gradle: App are attached.
I WANT TO MENTION THAT THE APPS ARE BEING DOWNLOADED FOR 100%, then the below dialogue is displayed.
Message Shown on Each Apps Installation
Below is manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com...">
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.front" android:required="false" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/ime_name"
android:largeHeap="true"
tools:replace="android:icon,android:label">
<activity
android:name="com...Main"
android:screenOrientation="unspecified"
android:label="#string/ime_name"
android:theme="#style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".PrefActivity"></activity>
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|
screenLayout|uiMode|screenSize|smallestScreenSize" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="#string/ads_application_id"/>
</application>
</manifest>
Build Gradle : App
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-R'
buildToolsVersion '29.0.2'
defaultConfig {
applicationId '...'
minSdkVersion 16
targetSdkVersion 29
versionCode 4
versionName '4.43'
}
lintOptions {
abortOnError false
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation 'junit:junit:4.13'
implementation project(':lib')
implementation project(':library')
implementation 'com.google.android.gms:play-services-ads:19.0.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
}
I don't have answers for you, but would like to help you debug this issue. If you have a device that reproduces the problem, try connecting it to your ADB and reading through the error logs what is happening when you get this message. In my case it was something like:
Submitter: commit error message INSTALL_FAILED_UPDATE_INCOMPATIBLE:
Package signatures do not match previously
installed version; ignoring! Task Failed: tid:1000000026,
statusCode:6004
com.google.android.finsky.installerv2.InstallerException: Status: 6004
This made me conclude that there was nothing wrong with the update itself. I was just trying to update from the version that Google Play did not sign to the one signed by Google Play. Not to mention it was a false alarm as my users were not dealing with this issue at all.
Hope you guys find your error message and get to fix your problems!
I've created application on android, the main goal was: User is logging with his Google Account, scans an NFC Tag, sends the information of user login and tag to server using volley library and getting response. Everything was working fine when, I was using Android studio and usb debugging, everything wrks fine. I've put the app on to google play store and it's not compatible with my p9 lite, or any other phone with NFC. So I can't even download app. This is screenshot from Google Play:
And here is my Android Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="some.package.name">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-feature android:name="android.nfc"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<meta-data
android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="#xml/nfc_tech_filter" />
</activity>
</application>
</manifest>
Here is also my gradle build Project:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And gradle build app:
apply plugin: 'com.android.application'
android {
signingConfigs {
config {
keyAlias 'key0'
storeFile file('C:/AndroidKey/RandomKey.jks')
keyPassword 'randomKey'
storePassword 'randomPassword'
}
}
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "someId"
minSdkVersion 15
targetSdkVersion 25
versionCode 3
versionName "1.02"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug {
signingConfig signingConfigs.config
}
}
}
dependencies {
compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'
compile 'com.android.volley:volley:1.0.0'
compile 'com.yarolegovich:lovely-dialog:1.0.5'
compile 'hanks.xyz:htextview-library:0.1.5'
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-auth:9.8.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Everything works fine connected by USB but I can't even download application from Google Play Store. What can I do in that case? Thanks and greetings.
EDIT:
I've change the <uses-feature android:name="android.nfc"/> to <uses-feature android:name="android.hardware.nfc"/> but still the same situation:
EDIT: My device has NFC, and when I click at the options to show the compatible devices for my app it's there.
The correct tag is
<uses-feature android:name="android.hardware.nfc"/>
If your app also works on devices that don't have an NFC chip, you should add android:required="false" to the above tag.
If your app works with devices without nfc module, you should change your uses-feature like that:
<uses-feature android:name="android.hardware.nfc" android:required="false" />
If your app doesn't work with devices without nfc module, you should have compatible device with nfc and change your uses-feature like that:
<uses-feature android:name="android.hardware.nfc" />
Okay, so I found a solution, thanks everyone for hints, the answer is not in the manifest, so sorry for confusing question. Private apps in company
I'm not the administrator of google play developer console, and the owner didn't check the rights to
Allow users to update Google Play Private Channel
so when developing a company apps this option is necessary.
Thanks for help and greetings.
EDIT: Also the device must have a work profile to install the app, it's working now.
You have to update <uses-feature> tag as
<uses-feature
android:name="android.hardware.nfc"
android:required="false" />
That's it! You will go live!
I have finish my application and run it perfectly on my emulator (Nexus 6 API 22). But when I try to run it on a real device, I have troubles, in the first device (with version 5) I have tried crash when I start an activity that implements google maps. At first I try to solve it by set it my key to the release folder as well as on the debug one, but the keep crashing. I thought was about some permissions or dependencies, but I thing I have everything right.
My build.gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "jocadoci.soloordena"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.android.gms:play-services:9.8.0'
compile 'com.google.android.gms:play-services-maps:9.8.0'
compile 'com.android.support:design:25.0.0'
compile 'com.paypal.sdk:paypal-android-sdk:2.14.2'
compile 'com.android.support:multidex:1.0.1'
}
And the AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="jocadoci.soloordena">
<uses-permission
android:name="jocadoci.soloordena.android.permission.ACCESS_FINE_LOCATION"
android:maxSdkVersion="25" />
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE"
android:maxSdkVersion="25" />
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION"
android:maxSdkVersion="25" />
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION"
android:maxSdkVersion="25" />
<uses-permission
android:name="android.permission.INTERNET"
android:maxSdkVersion="25" />
<uses-permission android:name="mypackage.android.permission.MAPS_RECEIVE"
android:maxSdkVersion="25" />
<application
android:allowBackup="true"
android:icon="#mipmap/soloorndenalogo"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:name="android.support.multidex.MultiDexApplication">
<activity android:name=".LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".RegisterActivity" />
<activity android:name=".MapsItaly"/>
<activity android:name=".ListViewCheckboxesActivity"/>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".DrawerActivity"
android:label="#string/title_activity_drawer"
android:theme="#style/AppTheme.NoActionBar">
</activity>
</application>
Then I try on another device (this one was with version 4.2.2), in this device just doesn't want to start, crashed when you tried to open it. I tried to change the version on my compileSDKVersion between 24 and 25 but look that is not that the problem. At this moment I don't know what else do, I thought also that was because my application use a google service should be post it already on google play, I did it but also did not work.
I will appreciate anyone who could help me.
Thanks in advance.
P.S: If someone want to try the app is in the store already but looks that only is available in Mexico, but if some one want to try it I could send my app-release.apk
UPDATE
First thanks all of you for give the time to answer. I appreciate.
Thanks to #Windsor answer came to me the doubt about using the same API key for the debug and release file. Looking about my sha-1 key and on the google development website I realize that indeed I could use the same API key for both files (debug and release) but the think was that with the generated signed key that I create building my apk I could use the sha-1 to add one more restriction to my API key and could use it to the app-release.apk. Successful the app run correctly on a real device (version 5), but unfortunately keep stopped on others version devices.
hello can you cheked Location Permision for API level 23?
Generate a signed apk.
Make sure you have your sha1 release key on Google API services. Does debug work on real devices?
Can't tell you without seeing the main activity.
If you api key isn't working normally you just don't get a map. If it works on multiple android versions in a emulator ods are api key. Debug keys don't work in the final copy you need to generate a apk with the release key!!!
Could be you method for getting location services.
I build for the lowest target version test then add compatibility for newer version that's what I like.
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.
I can't use Google Play services with the emulators in Android Studio. I give you my build.gradle and manifest files:
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
repositories {
mavenCentral()
}
defaultConfig {
applicationId "fr.myapp"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
multiDexEnabled true
}
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 'com.facebook.android:facebook-android-sdk:4.0.1'
compile 'com.google.android.gms:play-services:7.8.0'
compile 'com.android.support:multidex:1.0.1'
}
Part of my AndroidManifest (I don't show all the activities):
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<application
android:name="android.support.multidex.MultiDexApplication"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/app_id" />
<activity
android:name=".SettingsActivity"
android:label="#string/title_activity_settings" >
</activity>
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
</application>
</manifest>
And in a xml I just have the google button : com.google.android.gms.common.SignInButton
And when I lauch my Application, when I arrive in the activity containing the button, I have the following message : "the app won't run unless you update Google Play services". I also have (I tried some solutions) "this app won't run without Google Play services, which are missing from your phone".
I've found some questions on this problem, but it always said that the last emulator don't have this problem. But using the default Nexus 5 (API 22) emulator on android studio gives me these errors. So I tried to install the last apk google play services file, and after successing the install, I launch the app and have this time this error : "the app relies on Google play services, which is not supported by your device. Contact the manufacturer for assistance." I also tried with a virtual device that I created, with API 22 and 23 and I have the same errors.
I don't understand because I thought that the errors with Google play services didn't exist anymore on the last API.
Thanks for help.
Maybe try to create emulator with image x86 which includes Google APIs