Newbiee
Newbiee

Reputation: 592

Incompatible libraries in gradle

i want to use gcm in my app, but while adding dependancies in gradle file i got error of incompatible libraries. my app level gradle file have dependancies as follows ..

apply plugin: 'com.google.gms.google-services'
 .
 .
 .
 .
 .
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp:2.6.0'
compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2'
compile 'com.squareup.okhttp:logging-interceptor:2.6.0'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.appvirality:AppviralityUI:1.1.18+'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
}

and i have added classpath 'com.google.gms:google-services:1.5.0-beta2' in my project level gradle.

my google play services is updated to latest version but still it shows error like.. All libraries must use the exact same version specifications. After checking i got know that it conflicts compile 'com.appvirality:AppviralityUI:1.1.18+' library.

Thanks

Upvotes: 1

Views: 955

Answers (2)

Newbiee
Newbiee

Reputation: 592

Dont know how.. but, Got it wroking just by changing compile 'com.google.android.gms:play-services-gcm:8.3.0' to compile 'com.google.android.gms:play-services:8.3.0'

Upvotes: 0

IntelliJ Amiya
IntelliJ Amiya

Reputation: 75778

At first you need to change this

apply plugin: 'com.google.gms.google-services'

Use

apply plugin: 'com.android.application'

You can set your classpath as classpath 'com.android.tools.build:gradle:1.5.0'

Upvotes: 1

Related Questions