I seem to be getting the error of:
Error:Execution failed for task ':app:processDebugManifest'.> Manifest
merger failed : Attribute meta-data#android.support.VERSION#value
value=(26.0.0-alpha1) from
[com.android.support:appcompat-v7:26.0.0-alpha1]
AndroidManifest.xml:27:9-38 is also present at
[com.android.support:exifinterface:25.3.1] AndroidManifest.xml:24:9-31
value=(25.3.1). Suggestion: add 'tools:replace="android:value"' to
element at AndroidManifest.xml:25:5-27:41 to override.
It seems as though this error is caused, when I include an image cropping library of: compile 'com.theartofdev.edmodo:android-image-cropper:2.4.+'
Gradle build
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.myproj.blogapp"
minSdkVersion 21
targetSdkVersion 26
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'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
compile 'com.android.support:design:26.0.0-alpha1'
compile 'com.android.support:cardview-v7:26.0.+'
compile 'com.android.support:recyclerview-v7:26.0.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.google.firebase:firebase-appindexing:11.0.4'
compile 'com.google.firebase:firebase-storage:11.0.4'
compile 'com.google.firebase:firebase-crash:11.0.4'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.firebase:firebase-client-android:2.3.1'
compile 'com.squareup.okhttp:okhttp:2.7.5'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.+' //This dependency causing error
// FirebaseUI Database only
compile 'com.firebaseui:firebase-ui-database:2.1.1'
}
apply plugin: 'com.google.gms.google-services'
Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myproj.blogapp"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
tools:node="replace"
android:name=".SimpleBlog"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="PT Mosque"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="Feed">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="#style/Base.Theme.AppCompat" />
<activity
android:name=".PostActivity"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".timetable"
android:label="Salah Times"
android:windowSoftInputMode="adjustResize" />
<activity android:name=".RegisterActivity" />
<activity android:name=".LoginActivity" />
<activity android:name=".SetupActivity"></activity>
</application>
</manifest>
Change
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
compile 'com.android.support:design:26.0.0-alpha1'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.+'
to
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:support-v4:26.+'
compile ('com.theartofdev.edmodo:android-image-cropper:2.4.+'){
exclude group: 'com.android.support'
}
Add this to
xmlns:tools="http://schemas.android.com/tools"
Add this to
tools:node="replace"
Image cropper library requires older version of support library than your app.
There's a fresh bug filled in the issues for the library already but it's not fixed yet.
You can downgrade support library version used by your app ( to 25.3.1 ) and wait for a fix.
EDIT: you would need to lower build target accordingly. There's another bug for build target on github.
Related
I wanted to use table view in my android application but i get the following error:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application#label value=(Curtain Club) from AndroidManifest.xml:13:9-37
is also present at [de.codecrafters.tableview:tableview:2.8.0] AndroidManifest.xml:11:18-50 value=(#string/app_name).
Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:10:5-139:19 to override.
Here is my gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "Calculator.curtainclub"
minSdkVersion 23
targetSdkVersion 26
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 'com.android.support:recyclerview-v7:26.1.0'
compile 'de.codecrafters.tableview:tableview:2.8.0'
implementation 'com.android.support:wear:26.1.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testCompile 'junit:junit:4.12'
compile project(':jtds-1.3.1')
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestCompile 'com.android.support.test:runner:1.0.2'
androidTestCompile 'com.android.support:support-annotations:27.1.1'
compile files('libs/mail.jar')
compile files('libs/additionnal.jar')
compile files('libs/activation.jar')
}
if i remove the table view library, my gradle syncs perfectly with no errors
Here is my manifest file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="Curtain Club"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".LoginLogout.login">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Employees.AdminLogin" />
<activity android:name=".Calculator.Calc_140_pattern"></activity>
</application>
Please note i have opted out some activity files because there is a lot and it wouldn't allow me to add the question because of too much code
In your manifest file replace this
android:label="Curtain Club"
with
#string/curtain_club
Now Go to your strings.xml file and write this
<string name="curtain_club">Curtain Club</string>
After that rebuild your project
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>
I'm getting this error with my code when I try and implement a plugin called Helpshift.
Error:Execution failed for task ':app:processDebugManifest'.>
Manifest merger failed : Attribute
meta-data#android.support.VERSION#value value=(26.0.1) from
AndroidManifest.xml:16:13-35 is also present at
[com.android.support:design:26.1.0] AndroidManifest.xml:28:13-35
value=(26.1.0). Suggestion: add 'tools:replace="android:value"' to
element at AndroidManifest.xml:14:9-16:38 to override.
I think it has something to do with the versions of the app.
Here's my manifest file:
<?xml version="1.0" encoding="UTF-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.leoconnelly.connexus">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26" android:compileSDKVersion="26" android:buildToolsVersion="26" />
<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">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".HealthCenterListActivity" />
<activity android:name=".HealthCenterSelectedActivity" />
<activity android:name=".MoreInfoActivity" />
<meta-data
android:name="android.support.VERSION"
android:value="26.0.1" />
</application>
and here is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
lintOptions {
abortOnError false
}
defaultConfig {
applicationId "com.example.leoconnelly.connexus"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
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'
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'
implementation 'com.android.support:design:26.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
//Helpshift
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:recyclerview-v7:26.0.2'
compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.helpshift:android-helpshift-en-aar:6.4.2'
}
I beleive I'm doing something wrong with the versions, but when I change them I get a whole other error. Any help is apperciated.
remove this line in the manifest file:
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26" android:compileSDKVersion="26" android:buildToolsVersion="26" />
and in your build.gradle add this line in defaultConfig section:
buildToolsVersion '26.1.0'
do what #prem said above
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:recyclerview-v7:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
Instead of this
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:recyclerview-v7:26.0.2'
compile 'com.android.support:cardview-v7:26.0.2'
In case the support library is a hard dependency in Helpshift sdk, you can exclude it and using your selected support library version with something like this:
//Helpshift
// use version 26.1.0 instead of 26.0.2
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
// exclude the support library
implementation ('com.helpshift:android-helpshift-en-aar:6.4.2') {
exclude group: 'com.android.support'
exclude module: 'design'
exclude module: 'recyclerview'
exclude module: 'cardview-v7'
}
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'
}
}
}
}
This error message popped up after being able to import RecyclerView. I can't find the source, or a fix. The error message seems pretty hard to follow as well.
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31
is also present at [com.android.support:recyclerview-v7:26.0.0-alpha1] AndroidManifest.xml:24:9-38 value=(26.0.0-alpha1).
Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:25:5-27:34 to override.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.me.listviewprojektfuerapp">
<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=".ui.ListActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
build.gradle(module:app) :
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.me.listviewprojektfuerapp"
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'
}
}
}
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'
testCompile 'junit:junit:4.12'
compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
}
You are using com.android.support:appcompat-v7:25.3.1 and also com.android.support:recyclerview-v7:26.0.0-alpha1, recycler view is a part of appcompact library and hence the clash and also it is advisable to use same library versions
for more reference - https://developer.android.com/topic/libraries/support-library/features.html
You need to compile with this version of recyclerView
compile 'com.android.support:recyclerview-v7:25.3.1'
tools:replace="android:value"<==== put it on your in application attributes or you can make 2 version of both library to same version.