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>
Related
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
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.
I tried to use the latest version of Firebase for android in my gradle file. I am trying to build a firebase phone number authentication but I am continuously getting this error, it's because I couldn't find specifically to my issue:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(26.0.2) from [com.android.support:design:26.0.2] AndroidManifest.xml:28:13-35
is also present at [com.android.support:customtabs:26.0.1] AndroidManifest.xml:25:13-35 value=(26.0.1).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.
Here is my app:gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.shimetaapp.shimetacustomerapp"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
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 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.synnapps:carouselview:0.1.4'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:design:26.+'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
compile 'com.android.support:cardview-v7:26.+'
compile 'com.android.support:recyclerview-v7:26.+'
compile 'com.android.support:support-v4:26.+'
compile 'com.android.support:support-vector-drawable:26.+'
// compile 'com.facebook.android:account-kit-sdk:4.11.0'
// compile 'com.facebook.android:facebook-android-sdk:4.11.0'// Firebase Authentication
testCompile 'junit:junit:4.12'
// Firebase Database
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-config:11.0.4'
compile 'com.firebaseui:firebase-ui-auth:2.3.0'
}
apply plugin: 'com.google.gms.google-services'
Here is my manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.shimetaapp.shimetacustomerapp">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<application
android:name=".activity.App"
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=".activity.MainActivity"
android:theme="#style/AppTheme" />
<activity
android:name=".activity.ProfileActivity"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".activity.SettingsActivity"
android:label="#string/title_activity_settings" />
<activity
android:name=".activity.SplashActivity"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activity.Purchases" />
<activity android:name=".activity.PhoneNumberAuthentication">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
This is the documentation I used to setup my firebase in my android studio.
Version conflict between support artifact
com.android.support:design:26.0.2 and com.android.support:customtabs:26.0.1
Update your firebase-auth verison, firebase-auth has dependency of customtabs that is lower version of 26.0.1 in your case.
compile 'com.google.firebase:firebase-auth:11.2.0'
compile 'com.google.firebase:firebase-messaging:11.2.0'
compile 'com.google.firebase:firebase-config:11.2.0'
add this code to Gradle file
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.0.0'
}
}
}
}
I have many android modules implemented in my project. Each module is added as an independent Android module which can be launched on mobile or an emulator. After working on all the modules. Finally, I wanted to merge all those independent modules into one project and connect everything and make all the modules work as a single app.
To do that, I've replaced apply plugin: 'com.android.application' with
apply plugin: 'com.android.library' in all the module's gradle file except for the app/build.gradle which is the first module in the app and it has apply plugin: 'com.android.application'in its gradle.
Also, in the app/manifest.xml I have this defined in it:
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
But, when I launch the app on an emulator or a real device. The activity of the fourth module which is named as FirstTimeProfileSetup (i.e. not MainActivity) shows up on the screen as a first screen. when we wait for some time without any operations on the screen, then the FirstTimeProfileSetup screen goes off and the MainActivity of the app module will show up.
Below is the manifest.xml file of app module:
<?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.example">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<!--<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="25" />-->
<application
android:allowBackup="true"
android:icon="#mipmap/app_logo"
android:label="#string/app_name"
android:roundIcon="#mipmap/app_logo"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:replace="android:icon,android:roundIcon">
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name=".loginAndSignup.sign_in"
android:label="sign_in"
android:parentActivityName=".MainActivity"
android:theme="#style/AppTheme">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity android:name=".Registration" />
</application>
</manifest>
Below is the manifest of the other module whose activity is showing up first:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.firsttimeusermodule">
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!--<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="25" />-->
<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=".FirstTimeProfileSetup"></activity>
<activity android:name=".ProfilePic"></activity>
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.firsttimeusermodule"
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>
and below is the build.gradle of app module:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "-frtti -fexceptions"
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
productFlavors {
}
}
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.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
compile 'com.facebook.android:facebook-android-sdk:4.22.1'
compile 'com.google.gms:google-services:3.1.0'
compile 'com.android.support:support-v4:25.3.1'
testCompile 'junit:junit:4.12'
compile 'com.google.gms:google-services:3.1.0'
compile 'com.google.android.gms:play-services-auth:11.0.0'
compile 'com.google.android.gms:play-services-maps:11.0.0'
compile project(path: ':usertype')
compile project(path: ':firsttimeusermodule')
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
}
apply plugin: 'com.google.gms.google-services'
and below is the build.gradle file of the other module:
apply plugin: 'com.android.library'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
// applicationId "com.firsttimeusermodule"
minSdkVersion 15
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'
}
}
}
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.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.google.gms:google-services:3.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
Can anyone please helps me resolve this problem.
Thanks in advance
Here's the screenshot of Merged Manifest:
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.