Android application is not compatible with my device - android

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!

Related

Play Store says "can't install this app try again, and if it still doesn't work, see common ways to fix it" after downloading is 100% complete

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!

APK Parsing Error

I do not know how to continue...
I build a signed or unsigned apk with Android Studio (everything is up to date). Now I want to test this apk and install it on my phone.
But I always get a parsing error...
I tried diffrent devices but with the same result. I tryed a blank app but with the same result. I can't install it because of a parsing error. But deploying directly from AS works just fine!
What I tried out:
Reinstalling SDK (latest)
Reinstalling Android Studio (latest)
Reinstalling Java (latest)
an older gradle version (2.2.3)
Dev options and allowing unknown sources are aktive on all my devices.
minSdkVersion is set to 19 (I just have devices with Android 5 and 6)
I don't have an idea where the problem comes from...
Can somebody help me?
Thanks in advance!!!
OK I finally solved my problem!
I uploaded the apk to dropbox! That was the problem!
If I move the apk directly to the download folder of my device (using USB) everything works fine!
But anyway thanks for your help!
It's not the code at all! I tried a new blank project and I couldn't install it too
but here is the Manifest and the gradle:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.brokenbricksstudios.todo"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="23"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".ToDo"
android:clearTaskOnLaunch="true"
android:label="#string/app_name"
android:launchMode="singleTask"
android:theme="#style/AppTheme.NoActionBar">
<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.gms.version"
android:value="#integer/google_play_services_version" />
<service android:name=".bubbles.BubblesService"
android:enabled="true"
android:exported="false" />
</application>
</manifest>
gradle:
apply plugin: 'com.android.application'
android {
signingConfigs {
TODO {
keyAlias 'TODO'
keyPassword '***********'
storeFile file('E:/AndroidStudioProjects/KeyStore.jks')
storePassword '***********'
}
}
compileSdkVersion 23
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.brokenbricksstudios.todo"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
signingConfig signingConfigs.TODO
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.TODO
}
debug {
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
}

Firebase not working on my android project

I am trying to use Firebase crash reporting and notifications on an Android Project I inherited from my predecessor in my place of work.
For some unknown reason Firebase or OneSignal has refused to work on the project,it doesn't matter whether the app is in background or not. I implemented Firebase using the Android Studio Assistant.
However if I create fresh projects and implement Firebase or OneSignal it works glitchlessly.
Module build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.myfirm.appname"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.facebook.android:facebook-android-sdk:4.20.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.joanzapata.pdfview:android-pdfview:1.0.4#aar'
compile 'com.github.JakeWharton:ViewPagerIndicator:2.4.1'
compile 'com.android.support:design:25.3.0'
compile 'com.android.support:customtabs:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:cardview-v7:25.3.0'
compile 'com.android.support:support-v4:25.3.0'
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.google.firebase:firebase-crash:10.0.1'
compile 'com.onesignal:OneSignal:3.4.3'
compile 'com.google.android.gms:play-services-gcm:10.0.1'
compile 'com.google.android.gms:play-services-location:10.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Project build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Manifest
<?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.myfirm.appname">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application
android:name=".App"
android:allowBackup="true"
android:icon="#drawable/notification_icon"
android:label="#string/app_name"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:node="replace">
<service
android:name=".services.TokenService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<meta-data android:name="onesignal_app_id" android:value="#string/onesignal_app_id" tools:replace="android:value"/>
<meta-data android:name="onesignal_google_project_number" android:value="#string/onesignal_google_project_number" tools:replace="android:value"/>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_appid" />
<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" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="fbXXXXXXXXXXXX" />
</intent-filter>
</activity>
// More Activities
</application>
</manifest>
MyApplication
#Override
public void onCreate() {
super.onCreate();
OneSignal.setLogLevel(OneSignal.LOG_LEVEL.DEBUG, OneSignal.LOG_LEVEL.NONE);
FirebaseApp.initializeApp(this);
// Removed some code
OneSignal.startInit(this)
.setNotificationReceivedHandler(new OneSignalMessageReceiver())
.init();
}
A few things to note:
The app is always in background (I launched it and pressed the home button) when I send the notifications.
On the dashboards (both Firebase and OneSignal), the message says it's been successfully sent.
I'm getting the device token on Firebase and I uses it to send notifications. Sometimes it says notification has been sent and at other times it says token not registered.
The reason why it appears I'm using both Firebase and OneSignal is because I tried Firebase first, it didn't work. Then I used OneSignal hoping hat it would Work but it didn't. So if any one works, I remove the other.
The google-services.json exists in ProjectName > app and yes, the package name correspond with that in manifest.
The crash reports are not showing on Firebase dashboard even when the app has crashed severally.

Signed apk has 0 compatibility in google play store

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.

Can't use Google Play Services on emulator android studio

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

Categories

Resources