If I add paypal sdk then I get this problem else my project is running successfully.
Can some tell me from which dependency it is conflicting?
Here are my dependencies...
compile 'com.android.support:support-v13:23.1.0'
compile 'com.google.android.gms:play-services-plus:8.1.0'
compile 'com.google.android.gms:play-services-gcm:8.1.0'
compile 'com.google.android.gms:play-services-analytics:8.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2'
compile 'com.squareup.retrofit:adapter-rxjava:2.0.0-beta2'
compile 'io.reactivex:rxandroid:1.0.1'
compile 'com.jakewharton:butterknife:7.0.1'
compile files('libs/PayPalAndroidSDK-2.11.1.jar'
I removed build files and rebuilt the project but no hope and strange part is I have one dummy project where I write code first, in that project everything working fine but here getting error always.
Paypal library includes GSON dependency and Retrofit too, you have to exclude the GSON dependency from retrofit.
Related
I tried to link my app with gplus it works fine in separate and not when I merged it with my project app. Please take a look at the below gradle file and help me if u can.
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.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.squareup.retrofit2:converter-jackson:2.1.0'
compile 'de.hdodenhof:circleimageview:1.2.1'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-auth:9.0.2'
compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:multidex:1.0.1'
}
It shows the following error when i try to run:
java.lang.AbstractMethodError: abstract method "com.google.android.gms.common.api.Api$zze com.google.android.gms.common.api.Api$zza.zza(android.content.Context, android.os.Looper, com.google.android.gms.common.internal.zzf, java.lang.Object, com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks, com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener)"
I was facing the same issue,
I tried with changing 'com.google.android.gms:play-services-auth:9.0.2' and 'com.google.android.gms:play-services:9.0.2' to
'com.google.android.gms:play-services-auth:9.2.0'
'com.google.android.gms:play-services:9.2.0'
Try to change the version.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException:
java.util.zip.ZipException: duplicate entry:
com/android/volley/AuthFailureError.class
and this is my gradle build file:
compile fileTree(dir: 'libs', include: ['*.jar'])
//compile 'com.android.support:appcompat-v7:25.3.1'
//compile 'com.facebook.android:facebook-android-sdk:4.14.0'
compile project(path: ':linkedin-sdk')
// compile 'com.mcxiaoke.volley:library-aar:1.0.0'
// compile 'com.android.volley:volley:1.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.paolorotolo:expandableheightlistview:1.0.0'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.android.support:support-core-utils:25.3.1'
compile 'com.google.android.gms:play-services-maps:9.0.1'
compile 'com.google.android.gms:play-services-location:9.0.1'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.mcxiaoke.volley:library:1.0.19'
testCompile 'junit:junit:4.12'
}
The app works fine with the new version of the API.
But it has the problem with older versions of the API.
You seem to be confused about how to get Volley in your app
// compile 'com.android.volley:volley:1.0.0'
// compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.mcxiaoke.volley:library:1.0.19'
Those last two are deprecated. The first line is correct.
https://developer.android.com/training/volley/index.html
And you need to remove any Volley related files from the libs directory, plus make sure LinkedIn library also isn't using volley
I don't see why you need it though when you have Okhttp for http calls and Glide and Picasso for image loading
Related errors will arise from mixing 25.3.1, 23.0.1, 23.1.1, and 25.1.1 support libraries. Those all need to be the exact same
multiDexEnabled true
Add above line into your build.gradle file in defaultConfig like this:
defaultConfig{
multiDexEnabled true
}
You can test putting this on root of directory in the Terminal
./gradlew clean
im trying to use zxing to scan barcode using android studio
but when i try to add zxing gradle i got this error
Error:Execution failed for task ':app:transformClassesWithJarMergingForAristiDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/zxing/BarcodeFormat.class
this is what all gradle i have
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.jakewharton:butterknife:8.4.0'
compile 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.google.android.gms:play-services-maps:10.2.1'
compile 'com.google.android.gms:play-services-location:10.2.1'
compile 'com.karumi:dexter:2.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'me.dm7.barcodescanner:zxing:1.9'
testCompile 'junit:junit:4.12'
can somebody tell me what should i do ?? Or what should i search to remove this error ?
Sorry because i was newbie in java i dont know how to solve simple problem like this. After searching for a week im already found how to solve.
The problem is my jar contain same class in same directory this why i got this error. In my case, it was solved after i exclude which directory who cause this
compile ('me.dm7.barcodescanner:zxing:1.9.3'){
exclude group: 'com.google.zxing'
}
In my project, when I try and add the latest design support library I get this error which appears to be in conflict with the wallet library:
D:\Android Stuff\ReleaseMEdia\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-wallet\8.1.0\res\values\wallet_colors.xml
Error:(2) Attribute "rippleColor" has already been defined
Here is the list of all my gradle dependencies below:
compile 'com.google.android.gms:play-services-wallet:8.1.0'
compile 'com.google.android.gms:play-services-ads:7.8.0'
compile 'com.google.code.gson:gson:2.2.+'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.jakewharton:butterknife:5.1.2'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile 'com.balysv:material-ripple:0.9.0-SNAPSHOT#aar'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.jpardogo.materialtabstrip:library:1.0.6'
compile 'com.google.api-client:google-api-client-android:1.19.0'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.github.gabrielemariotti.cards:cardslib-core:2.0.1'
compile 'com.github.gabrielemariotti.cards:cardslib-cards:2.0.1'
compile 'com.github.gabrielemariotti.cards:cardslib-recyclerview:2.0.1'
compile 'se.emilsjolander:stickylistheaders:2.1.5'
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.android.support:palette-v7:23.1.0'
compile 'com.nispok:snackbar:2.11.+'
compile 'com.uwetrottmann:trakt-java:4.3.1'
compile 'com.melnykov:floatingactionbutton:1.3.0'
compile 'com.android.support:customtabs:23.1.0'
compile 'com.android.support:multidex:1.0.0'
compile 'jp.wasabeef:picasso-transformations:1.2.1'
compile 'com.android.support:design:23.1.0'
Everything syncs fine until I add the design library at the bottom, then I am presented with this message when trying to sync gradle.
I've seen a few other people online with this issue but it doesn't look like anyone has a resolution yet. Can anyone provide any insight?
It looks like this has nothing to do with wallet, but instead is an issue with the version of com.balysv:material-ripple you are using as per this issue.
The library's Github page shows that the latest version (which includes the above fix) is:
compile 'com.balysv:material-ripple:1.0.2'
Can't figure out why I keep getting this error why trying to run application (it compiles fine)
com.android.dex.DexException: Multiple dex files define Lcom/google/api/client/googleapis/GoogleUtils;
From the stack trace above I can say it stopped at:
/Users/jacek/Documents/GoW/myapp/build/pre-dexed/debug/support-v4-19.1.0-d45e513079f821d0bdcba2b3c444c8362d798113.jar
I think the next library it was going to generate was a dupplicate, but hard to say what was it...
Here are my dependencies:
dependencies {
compile project(':pixlUI')
compile project(':gowEndpoint')
compile project(':messageEndpoint')
compile 'com.google.android.gms:play-services:4.3.23'
compile 'com.android.support:appcompat-v7:19.1.+'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.jakewharton:butterknife:4.0.1'
compile 'joda-time:joda-time:2.1'
compile 'commons-lang:commons-lang:2.4'
compile 'commons-io:commons-io:2.4'
compile files('libs/google-api-client-1.16.0-rc.jar')
compile files('libs/google-api-client-android-1.16.0-rc.jar')
compile files('libs/google-http-client-1.16.0-rc.jar')
compile files('libs/google-http-client-android-1.16.0-rc.jar')
compile files('libs/google-http-client-gson-1.16.0-rc.jar')
compile files('libs/google-http-client-jackson-1.16.0-rc.jar')
compile files('libs/google-http-client-jackson2-1.16.0-rc.jar')
compile files('libs/google-oauth-client-1.16.0-rc.jar')
compile files('libs/jackson-core-2.1.3.jar')
compile files('libs/jackson-core-asl-1.9.11.jar')
compile files('libs/jsr305-1.3.9.jar')
}
After some try-error I figured out that
compile files('libs/jackson-core-2.1.3.jar')
compile files('libs/jackson-core-asl-1.9.11.jar')
were dupplicates