I am new in Android. i am currently working in android app and when i try to run the app this error occurs.
I have researched but cant solve this error.
error
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
multiDexEnabled true
applicationId "com.tutorialsbuzz.androidfacebook"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:multidex:1.0.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.google.android.gms:play-services-auth:9.2.1'
compile 'com.google.android.gms:play-services:7.5.0'
}
thankyou in advance
In my case, it's because of the
compile 'com.facebook.android:audience-network-sdk:4.+'
I change it to this:
compile ('com.facebook.android:audience-network-sdk:4.+'){
exclude group:"com.google.android.gms"
}
No more problem!
The reason behind that may be you have include two different versions for gms. Also if you have included the complete package then there is no need to include the second 'compile 'com.google.android.gms:play-services:7.5.0'' If you need only auth services from google then dont include the complete package it ll exceed 65k methods and duplicacy chances will be there. Include this
compile 'com.google.android.gms:play-services-auth:9.4.0'
and from your code remove
compile 'com.google.android.gms:play-services-auth:9.2.1' compile 'com.google.android.gms:play-services:7.5.0'
Execute it and let me know once.
If you are using Firebase, you should read my solution. In my case I developed a new app. This new app has ads, so I put compile 'com.google.firebase:firebase-ads:11.0.4'
BEFORE compile 'com.google.firebase:firebase-core:11.0.4'
.
But either you have to put everything AFTER firebase-core
or it's about the version number 11.0.4
that have to be the same on all firebase modules you are using.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With