Manifest merger failed with multiple errors CANNOT FIGURE ISSUE - android

I am trying to fix and build an Android app that is pretty old. Was making some headway but can't get past this point. I have googled like crazy and cannot figure it out.
Finally broke down and posted here. Any help would be greatly appreciated.
I am getting Manifest merger failed with multiple errors when i build
Thank you so much for any advice!!!!
Here is my app.gradle:
apply plugin: 'com.android.application'
repositories {
jcenter()
maven { url 'https://dl.bintray.com/drummer-aidan/maven' }
}
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "com.inspironlogistics.wensalerts"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
useLibrary 'org.apache.http.legacy'
}
dependencies {
implementation 'com.google.firebase:firebase-core:17.0.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//compile group: 'cz.msebera.android', name: 'httpclient', version: '4.4.1.1'
//compile group: 'org.apache.httpcomponents', name: 'httpclient-android', version: '4.3.5.1'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:28.0.0'
compile 'com.android.support:design:24.2.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.android.gms:play-services-gcm:10.2.0'
testCompile 'junit:junit:4.12'
//compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5'
//compile (group: 'org.apache.httpcomponents' , name: 'httpmime' , version: '4.3.5') {
// exclude module: 'org.apache.httpcomponents:httpclient'
//}
//compile files('libs/httpcore-4.3.3.jar')
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.afollestad:easyvideoplayer:0.3.0'
compile('org.apache.httpcomponents:httpmime:4.3.6') {
exclude module: 'httpclient'
}
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
}
apply plugin: 'com.google.gms.google-services'
AND Here is my manifest.xml:
<?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.inspironlogistics.wensalerts.wensalerts">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<permission
android:name="com.inspironlogistics.wensalerts.wensalerts.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.inspironlogistics.wensalerts.wensalerts.permission.C2D_MESSAGE" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".Activities$CreateAccountActivity"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity android:name=".Activities$SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Activities$VerificationActivity"
android:label="#string/title_activity_verification"
android:theme="#style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name=".Activities$RegisterActivity"
android:label="#string/title_activity_register"
android:theme="#style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name=".Activities$UserAccountActivity"
android:label="#string/title_activity_user_account"
android:theme="#style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<!-- GCM Receiver -->
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.inspironlogistics.wensalerts.wensalerts" />
</intent-filter>
</receiver>
<!-- GCM Receiver Service -->
<service
android:name=".Utilities.GCMPushReceiverService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<!-- GCM Registration Intent Service -->
<service
android:name=".Utilities.GCMRegistrationIntentService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<activity
android:name=".Activities$MessagesActivity"
android:label="#string/title_activity_messages"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".Activities$ImageListingActivity"
android:label="#string/title_activity_image_listing"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".Activities$VideoListingActivity"
android:label="#string/title_activity_video_listing"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".Activities$VideoPlayerActivity"
android:label="#string/title_activity_video_player"
android:theme="#style/AppTheme.NoActionBar"></activity>
</application>
</manifest>

AndroidX is incompatible with support libraries so when you use the support libraries, make sure you don't import any other dependency which uses AndroidX. Doing that will always result in manifestMerger errors. It is advisable to move to the AndroidX namespace so that your app can have access to modern versions of plugins and dependencies. You can migrate automatically by Choosing Migrate to AndroidX from the Refactor menu.
Refactor -> Migrate to AndroidX on Android Studio 3.x

Related

Manifest merger failed (After deleting a few files)

I tried adding some new activities to my project, but had to delete them for some reasons. And then my project started giving Manifest merger failed
error. I did not update any thing as such.
I get the following error :
Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(25.4.0) from [com.android.support:design:25.4.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.
Below is my AndroidManifest.xml file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.quickstart">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="Google Sheets API Android Quickstart"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="GBL"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
android:screenOrientation="landscape">
</activity>
<service android:name=".NotificationService" />
<receiver
android:name=".MyAlarmReceiver"
android:process=":remote" />
</application>
</manifest>
And this is my app build.gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.example.quickstart"
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:25.4.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.google.android.gms:play-services-auth:12.0.1'
compile 'pub.devrel:easypermissions:0.3.0'
compile('com.google.api-client:google-api-client-android:1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.apis:google-api-services-sheets:v4-rev523-1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
implementation 'com.github.PhilJay:MPAndroidChart:v2.2.4'
implementation files('libs/commons-net-3.6.jar')
testImplementation 'junit:junit:4.12'
}
I know this question has been asked tons of times but none of the answers seemed to help me a lot. Any help appreciated Thank you.
Set this manifest file :
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<application
android:allowBackup="fase"
android:icon="#mipmap/ic_launcher"
android:label="Google Sheets API Android Quickstart"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="GBL"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".NotificationService" />
<receiver
android:name=".MyAlarmReceiver"
android:process=":remote" />
</application>
Your dependencies must all use the same version of the support library.
Try changing the following line compile 'com.android.support:appcompat-v7:25.4.0'
dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:25.4.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.google.android.gms:play-services-auth:12.0.1'
compile 'pub.devrel:easypermissions:0.3.0'
compile('com.google.api-client:google-api-client-android:1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.apis:google-api-services-sheets:v4-rev523-1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
implementation 'com.github.PhilJay:MPAndroidChart:v2.2.4'
implementation files('libs/commons-net-3.6.jar')
testImplementation 'junit:junit:4.12'
}
Also, this is why you should use source control (git). When you run into an issue, you can just reset your repository to the last known working state.
You could do what your error says. Add 'tools:replace="android:value" to your manifest like so:
<application
...
android:theme="#style/AppTheme">
<meta-data
tools:replace="android:value">
...
</application>

Device isn't compatible for newer AND older phones in Google Play store

I just released my app on the google play store. My testing device is an older nexus 5 running 6.0.1, but I have a friend with a new android phone, and the app is not available for either phone on the play store.
There is no maxSdkVersion, and the mindSdkVersion is 17, which should work on 6.0.1 according to the android versions.
Here is my manifest:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<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.NoActionBar"
android:name="android.support.multidex.MultiDexApplication">
<activity android:name=".LauncherActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".LoginActivity" />
<activity android:name=".RegisterActivity" />
<activity android:name=".ForgotPasswordActivity" />
<activity
android:name=".MainNavigationActivity"
android:label="#string/title_activity_main_navigation"
android:theme="#style/AppTheme.NoActionBar" />
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</receiver>
<service
android:name=".services.PushGcmListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<service
android:name=".services.PushInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<service
android:name=".services.RegistrationIntentService"
android:exported="false" />
</application>
And here is my gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "#####"
minSdkVersion 17
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
// 3rd part
compile 'com.android.support:multidex:1.0.0'
compile 'br.com.simplepass:loading-button-android:1.12.0'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
compile 'com.google.code.gson:gson:2.8.2'
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
//required support lib modules
implementation "com.android.support:recyclerview-v7:26.1.0"
implementation "com.android.support:support-annotations:26.1.0"
compile 'com.github.pavlospt:circleview:1.3'
compile 'com.google.android.gms:play-services-gcm:12.0.0'
apply plugin: 'com.google.gms.google-services'
//compile group: "com.twilio.sdk", name: "twilio", version: "7.18.0"
SOLUTION:
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
This reference had to be removed and a new APK published. After it was removed the Google Play console recognized 12k+ devices for the new build.

Gradle Manifest merger failed when upgrading to android studio 3.0

returned to Android Studio to finish an app after 2 month of not working on it. upgraded to Android Studio 3.0, and now my Gradle doesn't sync and I have errors I can't seem to fix.
the error is :
> Error:Execution failed for task ':app:processDebugManifest'.
> > Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(25.4.0) from
> [com.android.support:design:25.4.0] AndroidManifest.xml:28:13-35 is
> also present at [com.android.support:support-v4:26.1.0]
> AndroidManifest.xml:28:13-35 value=(26.1.0). Suggestion: add
> 'tools:replace="android:value"' to <meta-data> element at
> AndroidManifest.xml:26:9-28:38 to override.
my app Gradle is this:
apply plugin: 'com.android.application'
android {
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
compileSdkVersion 25
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "shomrim.warpcodes.com.shomrim"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1"
manifestPlaceholders = [onesignal_app_id: "(not showing it)",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "REMOTE"]
packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [manifestApplicationId: "${applicationId}",
onesignal_app_id: "(not showing it)",
onesignal_google_project_number: "(not showing it)"]
// Enabling multidex support.
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'de.hdodenhof:circleimageview:2.1.0'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.firebaseui:firebase-ui-storage:2.2.0'
compile 'com.firebaseui:firebase-ui:2.2.0'
//compile 'com.google.android.gms:play-services:11.4.2'
compile 'com.google.android.gms:play-services-location:11.4.2'
compile 'com.google.android.gms:play-services-maps:11.4.2'
// Required for OneSignal, even if you have added FCM.
compile 'com.google.android.gms:play-services-gcm:11.4.2'
// Required for geotagging
compile 'com.google.android.gms:play-services-location:11.4.2'
compile 'com.android.support:design:25.4.0'
compile 'com.android.support:cardview-v7:25.4.0'
compile 'com.android.support:recyclerview-v7:25.4.0'
compile 'com.android.support:support-v13:25.4.0'
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.google.firebase:firebase-storage:11.4.2'
compile 'com.google.firebase:firebase-core:11.4.2'
compile 'com.google.firebase:firebase-auth:11.4.2'
compile 'com.google.firebase:firebase-database:11.4.2'
compile 'com.google.firebase:firebase-messaging:11.4.2'
compile 'com.android.support:multidex:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.firebase:firebase-client-android:2.5.2'
// OneSignal SDK
compile 'com.onesignal:OneSignal:3.6.5'
//compile 'com.google.android.gms:play-services-appindexing:10.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
}
apply plugin: 'com.google.gms.google-services'
This is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="shomrim.warpcodes.com.shomrim">
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT" />
<uses-permission android:name="android.permission.CAMERA" />
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".RegistrationActivity" />
<activity android:name=".WatchmenTowerActivity" />
<activity android:name=".LoginActivity" />
<activity android:name=".UserProfileActivity" />
<!--
android:name="android.support.multidex.MultiDexApplication"
The API key for Google Maps-based APIs is defined as a string resource.
(See the file "res/values/google_maps_api.xml").
Note that the API key is linked to the encryption key used to sign the APK.
You need a different API key for each encryption key, including the release key that is used to
sign the APK for publishing.
You can define the keys for the debug and release targets in src/debug/ and src/release/.
//<service android:name=".GPSTracker$GPSTracker" />
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name=".MapsActivity"
android:label="#string/title_activity_maps" />
<activity android:name=".GroupsActivity" />
<activity android:name=".DatabaseActivity" />
<activity android:name=".OperationsActivity" />
<service
android:name=".MyService"
android:enabled="true"
android:exported="true" />
<!--
ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information.
-->
<!--
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
-->
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="shomrim.warpcodes.com.shomrim.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<!--
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths"></meta-data>
-->
</provider>
</application>
</manifest>
I am missing something simple, please help me understand what it is. tried changing versions many times, didn't work.
thanks.

Android app is supported by 0 devices in Play Store Publish

We don't understand why after the upload of our apk on the Google Play Developer Console we have 0 devices supported. Our personal thought is the Manifest and the build.gradle are ok: we can produce apk, than we can distribuite it to our beta tester without problems. Can you help us? Where is our error here, in your opinion?
AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.hendyghsta.bacameter"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="25"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.FLASHLIGHT"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-feature
android:name="android.hardware.camera"
android:required="false"/>
<uses-feature
android:name="android.hardware.camera2.full"
android:required="false"/>
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false"/>
<uses-feature
android:name="android.hardware.location"
android:required="false"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="false"/>
<application
android:name=".common.App"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/Theme.AppTheme">
<activity android:name=".activity.LoginActivity">
</activity>
<activity android:name=".activity.TesterActivity">
</activity>
<activity android:name=".activity.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".activity.ScanActivity"
android:parentActivityName=".activity.MainActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".activity.ResultActivity"
android:label="Input Result"
android:parentActivityName=".activity.MainActivity"
android:theme="#style/Theme.AppTheme">
</activity>
<activity
android:name=".activity.MainActivity"
android:label="Pembaca Meter"
android:theme="#style/Theme.AppTheme">
</activity>
<activity
android:name=".activity.SettingActivity"
android:label="Pengaturan"
android:theme="#style/Theme.AppTheme">
</activity>
<activity
android:name="com.afollestad.materialcamera.CaptureActivity"
android:theme="#style/MaterialCamera.CaptureActivity"/>
<activity
android:name="com.afollestad.materialcamera.CaptureActivity2"
android:theme="#style/MaterialCamera.CaptureActivity"/>
<service
android:name=".common.UploadService"
android:permission="android.permission.BIND_JOB_SERVICE"/>
<activity
android:name=".activity.LogActivity"
android:parentActivityName=".activity.MainActivity"
android:theme="#style/Theme.AppTheme">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.MainActivity"/>
</activity>
<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=".activity.MapsActivity"
android:label="#string/title_activity_maps"
android:parentActivityName=".activity.MainActivity"
android:theme="#style/Theme.AppTheme">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.MainActivity"/>
</activity>
<meta-data
android:name="io.fabric.ApiKey"
android:value="***"/>
<service android:name=".account.MyFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service android:name=".account.FirebaseIDService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
<activity android:name=".activity.PesanActivity" android:theme="#style/Theme.AppTheme">
</activity>
<activity android:name=".activity.BarcodeActivity" android:theme="#style/Theme.AppTheme" >
</activity>
<receiver
android:name=".common.ConnectivityReceiver"
android:enabled="true">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
</intent-filter>
</receiver>
</application>
</manifest>
App Gradle:
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'android-apt'
apply plugin: 'realm-android'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.hendyghsta.bacameter"
minSdkVersion 21
targetSdkVersion 25
versionCode 6
versionName "3.0.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
signingConfigs {
config {
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile file('C:/Users/Acer/.android/debug.keystore')
storePassword 'android'
}
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
}
packagingOptions {
//exclude 'META-INF/DEPENDENCIES'
//exclude 'META-INF/LICENSE'
// exclude 'AndroidManifest.xml'
exclude 'lib/arm64-v8a/librealm-jni.so'
exclude 'lib/mips/librealm-jni.so'
exclude 'lib/x86/librealm-jni.so'
exclude 'lib/x86_64/librealm-jni.so'
exclude 'lib/x86/libopencv_java3.so'
exclude 'lib/x86/libanylineCore.so'
exclude 'lib/x86/libgnustl_shared.so'
}
}
repositories {
flatDir {
dirs 'libs'
}
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
maven { url "https://dl.bintray.com/drummer-aidan/maven" }
maven { url "https://jitpack.io" }
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
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(name: 'anylinesdk-3.8.1', ext: 'aar')
compile project(':mcamera')
compile('com.crashlytics.sdk.android:crashlytics:2.6.7#aar') {
transitive = true;
}
compile('com.pubnub:pubnub-android:3.7.14#aar') {
transitive = true;
}
compile('io.fabric.sdk.android:fabric:1.3.10#aar') {
transitive = true;
}
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:support-v13:25.2.0'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'com.google.code.gson:gson:2.7'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.0.1'
compile 'io.reactivex:rxjava:1.1.3'
compile 'com.artemzin.rxjava:proguard-rules:1.1.3.0'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'org.glassfish:javax.annotation:10.0-b28'
compile 'com.jakewharton:butterknife:8.4.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.squareup:otto:1.3.8'
compile 'net.gotev:uploadservice-ftp:3.2.3'
compile 'com.balysv:material-ripple:1.0.2'
compile 'com.afollestad.material-dialogs:core:0.9.1.0'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'jp.wasabeef:recyclerview-animators:2.2.5'
compile 'com.github.PhilJay:MPAndroidChart:v2.2.4'
compile 'com.github.rey5137:material:1.2.4'
compile 'com.robinhood.ticker:ticker:1.1.1'
compile 'com.orhanobut:dialogplus:1.11#aar'
compile 'com.google.android.gms:play-services-vision:10.2.0'
compile 'com.google.android.gms:play-services-location:10.2.0'
compile 'com.google.maps.android:android-maps-utils:0.4.4'
compile 'me.dm7.barcodescanner:zbar:1.8.4'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.0'
compile 'com.google.firebase:firebase-core:10.2.0'
compile 'io.realm:android-adapters:1.4.0'
testCompile 'junit:junit:4.12'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
}
apply plugin: 'com.google.gms.google-services'
You have a problem with location:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
Acctording to documentation:
Caution: If your app targets Android 5.0 (API level 21) or higher, you must declare that your app uses the android.hardware.location.network or android.hardware.location.gps hardware feature in the manifest file, depending on whether your app receives location updates from NETWORK_PROVIDER or from GPS_PROVIDER. If your app receives location information from either of these location provider sources, you need to declare that the app uses these hardware features in your app manifest. On devices running verions prior to Android 5.0 (API 21), requesting the ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permission includes an implied request for location hardware features. However, requesting those permissions does not automatically request location hardware features on Android 5.0 (API level 21) and higher.
So add
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature android:name="android.hardware.location.network" />
You can remove uses-sdk tag from Manifest too. Try to upload another version.
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="25"/>
There can be problem with Google Developer console too. They are updating the system. You may try new App App release, try to create a ALPHA release.

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:
Unsupported devices:15023
Below is the listings from Google play developer console
menifest file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="masco.mis.software.mascoapproval">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-feature android:name="android.hardware.Camera" android:required="true"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<application
android:name=".Tapplication"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher_masco"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyC7UKI8yiVrzUllwLS3V2_b-H5Mor54KGc"/>
<meta-data android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="#drawable/ic_message"/>
<meta-data android:name="com.google.firebase.messaging.default_notification_color"
android:resource="#color/colorPrimary"/>
<activity android:name=".MapActivity">
android:parentActivityName=".HomeActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".HomeActivity"/>
</activity>
<activity
android:name=".LoginActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".HomeActivity"
android:screenOrientation="portrait">
</activity>
<activity android:name=".chatoperation.NewChatOperationActivity">
</activity>
<activity android:name=".IntroActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".chat.ChatOperationActivity"/>
<receiver
android:name=".TReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
<service
android:name=".service.LocationTService"
android:exported="false"/>
<service
android:name=".service.CountTService"
android:enabled="true"
android:exported="true"/>
<service
android:name=".service.FCMService"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service android:name=".fcm.FcmToken">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version"/>
</application>
</manifest>
my gradle dependency looks below:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "masco.mis.software.mascoapproval"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
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.volley:volley:1.0.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.google.android.gms:play-services-location:10.2.0'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.google.android.gms:play-services-places:10.2.0'
compile 'com.google.android.gms:play-services-analytics:10.2.0'
compile 'ch.acra:acra:4.9.1'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
compile 'com.android.support:design:25.2.0'
compile 'me.leolin:ShortcutBadger:1.1.11'
compile 'com.github.markomilos:paginate:0.5.1'
compile 'com.github.castorflex.smoothprogressbar:library-circular:1.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'jp.wasabeef:recyclerview-animators:1.2.2'
compile 'com.google.firebase:firebase-messaging:10.2.0'
compile 'com.google.firebase:firebase-core:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
But this app runs without any problem when I test it with physical device and also on emulator(api 19,22,25) on android studio.
You have indicated the camera feature in your manifest file:
<uses-feature android:name="android.hardware.Camera" android:required="true" />
but it must be all lowercase:
<uses-feature android:name="android.hardware.camera" android:required="true" />
No device has android.hardware.Camera which is why you are compatible with zero devices.

Categories

Resources