When i am adding the library for CardView ("compile 'com.android.support:cardview-v7:25.3.1'") in my build.gradle ( Module : app ) file it is showing me error
Please help me in this !!
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "in.trysafe.trysafecfs"
minSdkVersion 14
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 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.android.support:appcompat-v7:26.+'
compile 'com.android.support:design:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.google.firebase:firebase-core:10.0.1'
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'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
it is showing me this error:
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:design:26.0.0-alpha1]
AndroidManifest.xml:27:9-38
is also present at [com.android.support:cardview-v7:25.3.1]
AndroidManifest.xml:24:9-31 value=(25.3.1).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at
AndroidManifest.xml:25:5-27:41 to override.
Change your
compile 'com.android.support:cardview-v7:25.3.1'
to
compile 'com.android.support:cardview-v7:26.+'
Because ALL support libs shoud be the same version.
Use exact same version of dependency instead of 26.+
compile is deprecated
Also Use implementation instead of compile
Try this
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
Than clean - Re-Build - Run your project
Related
I have upgraded to android studio canary and trying to add firebase UI to my app but am getting the following error:
Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(26.0.1) from [com.android.support:customtabs:26.0.1] AndroidManifest.xml:25: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 <meta-data> element at AndroidManifest.xml:23:9-25:38 to override.
It seems to be some dependency problem but cant figure it out yet. My gradle file is as follow
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.rainbow.dili"
minSdkVersion 16
targetSdkVersion 25
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'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}
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.google.firebase:firebase-database:12.0.1'
compile 'com.google.firebase:firebase-storage:12.0.1'
compile 'com.firebaseui:firebase-ui:2.3.0'
compile 'com.tbuonomo.andrui:viewpagerdotsindicator:1.0.1'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.1.0-beta6'
compile 'com.droidninja:filepicker:2.0.7'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.android.support:support-v4:26.1.0'
compile 'me.relex:circleindicator:1.2.2#aar'
compile 'jp.wasabeef:picasso-transformations:2.1.0'
compile 'com.android.support:support-vector-drawable:26.1.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
I have been advised to get the same version for
compileSdkVersion 26
and
buildToolsVersion "26.0.1"
but still get the same error. What might be causing this ?
You are using an old version of firebaseui that is not compatible with version 12.0.1 of firebase, to solve this:
Change the following:
compile 'com.firebaseui:firebase-ui:2.3.0'
to this:
compile 'com.firebaseui:firebase-ui:3.3.0'
more info here:
https://github.com/firebase/FirebaseUI-Android#compatibility-with-firebase--google-play-services-libraries
I wanted to go back and continue my android app after 4 month, what happend is that manifest doesn't sync with the following error:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(26.1.0) from [com.android.support:support-v13:26.1.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:design:26.0.1] AndroidManifest.xml:28: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.
and my manifest is:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.arnick.bazim"
minSdkVersion 21
targetSdkVersion 26
versionCode 7
versionName "0.9.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [onesignal_app_id : #the one signal app id,
onesignal_google_project_number: "REMOTE"]
}
applicationVariants.all { variant ->
variant.resValue "string", "versionName", variant.versionName
}
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.android.support:support-v13:26.1.0'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:cardview-v7:26.0.1'
compile 'com.android.support:design:26.0.1'
compile 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:customtabs:26.1.0'
compile 'com.google.firebase:firebase-auth:11.6.2'
compile 'com.google.android.gms:play-services-auth:11.6.2'
compile('io.socket:socket.io-client:1.0.0') {
// excluding org.json which is provided by Android
exclude group: 'org.json', module: 'json'
}
compile 'com.onesignal:OneSignal:3.6.5'
compile 'com.android.volley:volley:1.0.0'
testCompile 'junit:junit:4.12'
}
if that matters, I'm using local gralde version 4.2.1
I have also checked gradle 4.3.1 and non-local gradle but the error is still there.
Is there anything I am missing?
I remember about 5 6 months ago I faced the same issue I guess, and that was related to onesignal version but I do not remember what happened I just know I changed the version and error disappeared.
use same version as at top of gradle file 26.0.2
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.arnick.bazim"
minSdkVersion 21
targetSdkVersion 26
versionCode 7
versionName "0.9.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [onesignal_app_id : #the one signal app id,
onesignal_google_project_number: "REMOTE"]
}
applicationVariants.all { variant ->
variant.resValue "string", "versionName", variant.versionName
}
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.android.support:support-v13:26.0.2'
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.android.support:customtabs:26.0.2'
compile 'com.google.firebase:firebase-auth:11.6.2'
compile 'com.google.android.gms:play-services-auth:11.6.2'
compile('io.socket:socket.io-client:1.0.0') {
// excluding org.json which is provided by Android
exclude group: 'org.json', module: 'json'
}
compile 'com.onesignal:OneSignal:3.6.5'
compile 'com.android.volley:volley:1.0.0'
testCompile 'junit:junit:4.12'
}
clean and rebuild this may help...
Use the same version of support libraries:
Change
compile 'com.android.support:cardview-v7:26.0.1'
compile 'com.android.support:design:26.0.1'
with
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
I'm trying to upgrade android.arch.persistence.room in my android project.
Now I'm using the alpha-9 and all is working correctly.
If I try to use the "released" version 1.0.0 I'll recive the error reported below on the line compile 'com.android.support:appcompat-v7:26.0.2'.
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:support-core-utils:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:26:9-28:38 to override.
The gradle file is
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
minSdkVersion 18
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
useLibrary 'org.apache.http.legacy'
}
}
}
dependencies {
debugCompile 'com.amitshekhar.android:debug-db:1.0.1'
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.journeyapps:zxing-android-embedded:3.5.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'android.arch.persistence.room:runtime:1.0.0'
annotationProcessor 'android.arch.persistence.room:compiler:1.0.0'
}
Does someone kwnow how I can fix it?
Thanks
Change:
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:support-v4:26.0.2'
to:
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:support-v4:26.1.0'
See if the changes to following versions would work for you:
(archLifecycleVersion = '1.0.0'
roomLifecycleVersion = '1.0.0')
annotationProcessor "android.arch.lifecycle:compiler:$rootProject.ext.archLifecycleVersion"
compile "android.arch.lifecycle:runtime:$rootProject.ext.archLifecycleVersion"
compile "android.arch.lifecycle:extensions:$rootProject.ext.archLifecycleVersion"
compile "android.arch.persistence.room:runtime:$rootProject.roomLifecycleVersion"
annotationProcessor "android.arch.persistence.room:compiler:$rootProject.roomLifecycleVersion"
I have problem on AppLovin.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/applovin/adview/AdViewController.class
My gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "in.earnpaytm.dhankubair"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled 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.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services:9.6.1'
compile 'cn.pedant.sweetalert:library:1.3'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.mcxiaoke.volley:library:1.0.18'
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
compile 'com.google.android.gms:play-services-gcm:9.6.1'
compile 'com.google.android.gms:play-services-ads:9.6.1'
compile 'com.google.android.gms:play-services-fitness:9.6.1'
compile 'com.google.android.gms:play-services-wearable:9.6.1'
compile 'com.applovin:applovin-sdk:7.3.2'
compile 'com.github.paolorotolo:appintro:4.1.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.firebase:firebase-messaging:9.6.1'
}
dependencies {
compile 'com.google.android.gms:play-services-ads:9.6.1'
}
dependencies {
compile 'com.google.android.gms:play-services-auth:9.6.1'
}
dependencies {
compile 'com.google.android.gms:play-services-gcm:9.6.1'
}
apply plugin: 'com.google.gms.google-services'
My Manifest
<meta-data android:name="applovin.sdk.key" android:value="3Uwn4udUbwnsMOvbmpDJ7IEegaoOPqmSIgDNZrtd061wiokw5rCKUuwGGJ50nNg_mFqdPaFPgHKO32J9uVTM" />
<activity android:name="com.applovin.adview.AppLovinInterstitialActivity" android:configChanges="orientation|screenSize"/>
<activity android:name="com.applovin.adview.AppLovinConfirmationActivity" android:configChanges="orientation|screenSize"/>
And I have two applovin sdk
1.applovin-sdk-7.3.2
2.applovin-sdk-7.3.2-javadoc
Help me to resolves this problem!
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/applovin/adview/AdViewController.class
It means that you are adding twice the same classes.
According with your comment:
Do you have also a jar for applovin?
#GabrieleMariotti Yes!
Since you are using:
compile 'com.applovin:applovin-sdk:7.3.2'
Delete the .jars related to applovin library from your libs folder
it looks like you're adding the AppLovin library multiple times. either remove this line from your gradle.build file:
compile 'com.applovin:applovin-sdk:7.3.2'
or delete these .jars from your libs folder:
applovin-sdk-7.3.2.jar
applovin-sdk-7.3.2-javadoc.jar
you only need one or the other, but not both.
I updated Android Studio and SDK tools to the latest version and now I got this error. I have updated Google Services and firebase dependencies accordingly. I tried to clean and rebuild the project but the result is same.
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.lang.NullPointerException: element == null
Here is my gradle build:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.crisser.beitnaonline"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled 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'
})
//noinspection GradleCompatible
compile('com.android.support:cardview-v7:23.2.0') {
force = true
}
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-database:11.0.0'
compile 'com.google.firebase:firebase-auth:11.0.0'
compile 'com.google.firebase:firebase-core:11.0.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.google.android.gms:play-services-maps:11.0.0'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:multidex:1.0.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile
'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.appolica:interactive-info-window:v1.0.6'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC0'
}
apply plugin: 'com.google.gms.google-services'
Anyone knows why it does that? It worked just fine with 25.0.3.
You didn't compile corresponding dependency with annotation
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC0'
Add this to your gradle file
compile 'com.github.bumptech.glide:glide:4.0.0'
I have gone through same issue. I just removed the dependency I added and my app began to work fine.
you should remove library one by one and build the application..