Gradle problem when add new places SDK from google - android

I have this problem when I add the new Places SDK for Android.
implementation 'com.google.android.libraries.places:places:1.0.0'
Im using this URL: https://developers.google.com/places/android-sdk/client-migration
This is my gradle:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.google.firebase:firebase-core:11.8.0'
api('com.crashlytics.sdk.android:crashlytics:2.8.0#aar') {
transitive = true
}
api('com.journeyapps:zxing-android-embedded:3.6.0') {
transitive = false
}
api('com.salesforce.marketingcloud:marketingcloudsdk:5.6.3') {
exclude module: 'android-beacon-library' //remove to use Proximity messaging
exclude module: 'play-services-location' //remove to use Geofence or Proximity messaging
}
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-fragment:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-core-ui:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
api 'com.commonsware.cwac:sacklist:1.0.3'
implementation 'com.android.support:cardview-v7:28.0.0'
api 'com.squareup.retrofit2:retrofit:2.2.0'
api 'com.squareup.retrofit2:converter-gson:2.2.0'
api 'com.github.bumptech.glide:glide:4.7.1'
api 'com.theartofdev.edmodo:android-image-cropper:2.5.1'
api 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.google.android.libraries.places:places:1.0.0'
api 'com.facebook.android:facebook-android-sdk:4.35.0'
api 'me.grantland:autofittextview:0.2.1'
api 'io.github.inflationx:calligraphy3:3.0.0'
api 'io.github.inflationx:viewpump:1.0.0'
api 'com.airbnb.android:lottie:2.7.0'
api 'org.parceler:parceler-api:1.1.12'
api 'com.github.asyl.animation:arcanimator:1.0.0'
api 'com.makeramen:roundedimageview:2.3.0'
api 'com.codesgood:justifiedtextview:1.0.2'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
api 'com.journeyapps:zxing-android-embedded:3.3.0'
implementation 'com.google.firebase:firebase-dynamic-links:11.8.0'
testImplementation 'junit:junit:4.12'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
annotationProcessor 'org.parceler:parceler:1.1.12'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation 'org.altbeacon:android-beacon-library:2.12.4'
implementation 'com.android.support:multidex:1.0.3'
}
I have this problem:
error: cannot access zzbfm
class file for com.google.android.gms.internal.zzbfm not found

Related

How to fix Duplicate class org.jetbrains.annotations.TestOnly Error?

I get many errors like this:Duplicate class org.jetbrains.annotations.TestOnly found in the following modules:...
This is an indication that i miss an exclude, but i have the following lines in my build.gtadle
configurations {
cleanedAnnotations
compile.exclude group: 'org.jetbrains' , module:'annotations'
compile.exclude group: 'org.jetbrains.kotlin' , module:'kotlin-stdlib'
compile.exclude group: 'com.intellij', module:'annotations'
}
So what is missing?
Edit:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//Firebase
implementation ("com.google.firebase:firebase-core:17.2.0") {
exclude group: "com.android.support", module: "support-v4"
}
implementation 'com.google.firebase:firebase-messaging:20.0.0'
implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation 'com.google.firebase:firebase-plugins:2.0.0'
implementation 'com.google.firebase:firebase-crash:16.2.1'
implementation 'com.google.firebase:firebase-ml-vision:24.0.0'
implementation ("com.google.firebase:firebase-auth:19.1.0") {
exclude group: "com.android.support", module: "support-v4"
}
implementation 'com.google.firebase:firebase-database:19.1.0'
implementation 'com.google.firebase:firebase-storage:19.1.0'
//Graphview
implementation 'com.jjoe64:graphview:4.2.1'
implementation 'org.apache.commons:commons-lang3:3.4'
//Google Play
implementation ("com.google.android.gms:play-services-base:17.1.0") {
exclude group: "com.android.support", module: "support-v4"
}
implementation "com.google.android.gms:play-services-auth:17.0.0"
implementation "com.google.android.gms:play-services-identity:17.0.0"
//FirebaseUI
implementation 'com.firebaseui:firebase-ui-auth:6.0.2'
implementation 'com.firebaseui:firebase-ui-storage:6.0.2'
implementation 'com.facebook.android:facebook-android-sdk:5.8.0'
implementation 'com.twitter.sdk.android:twitter-core:3.1.1'
//Support
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.appcompat:appcompat-resources:1.1.0"
implementation "androidx.navigation:navigation-fragment-ktx:2.2.1"
implementation "androidx.drawerlayout:drawerlayout:1.0.0"
implementation "androidx.gridlayout:gridlayout:1.0.0"
implementation "androidx.preference:preference:1.1.0"
implementation "androidx.recyclerview:recyclerview:1.1.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation "io.reactivex.rxjava2:rxjava:2.2.13"
implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
//Glide
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
/**
* dependency to request the runtime permissions.
*/
implementation 'com.karumi:dexter:4.2.0'
// code generator for view
implementation "com.jakewharton:butterknife:10.2.0"
annotationProcessor "com.jakewharton:butterknife-compiler:10.2.0"
testImplementation 'junit:junit:4.12'
}
So here are my dependencies, i have this packages not directly included, but somehow they are i guess indirectly.
This seems to be to much code for the post so i have to add some text
Remove implementation 'com.jjoe64:graphview:4.2.1' from your dependencies it is known to cause duplicate class errors.
You can also use implementation 'com.jjoe64:graphview:4.2.2'

Error: Program type already present: androidx.arch.core.internal.FastSafeIterableMap

When I integrate the unity game on my android app, so application is run on my device easily but when I build the apk I get the following error.
I want to add a unity game on my existing android application.
implementation "androidx.collection:collection:$collection_version"
implementation 'androidx.annotation:annotation:1.1.0'
// ANDROID LIBS
//noinspection GradleCompatible
//
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
// FACEBOOK LIB
implementation 'com.facebook.android:facebook-login:5.1.1'
// GPLUS LIB
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.firebase:firebase-auth:19.1.0'
implementation ("com.firebaseui:firebase-ui-auth:4.1.0") {
exclude group: "android.arch.lifecycle"
exclude group: "com.android.support"
}
// FIREBASE LIBS
implementation 'com.google.firebase:firebase-messaging:20.0.1'
implementation 'com.google.firebase:firebase-core:17.2.1'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.google.firebase:firebase-perf:19.0.2'
// AWS LIBS
implementation 'com.amazonaws:aws-android-sdk-core:2.6.31'
implementation 'com.amazonaws:aws-android-sdk-s3:2.6.31'
implementation 'com.amazonaws:aws-android-sdk-ddb:2.6.31'
// WEBSERVICE LIB
implementation 'com.medy:retrofitwrapper:1.5.1'
// IMAGE LOAD LIB
implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
// OTHER LIBS
implementation 'com.github.jineshfrancs:CaptchaImageView:1.0'
implementation 'com.github.Ibotta:Supported-Picker-Dialogs:1.0.0'
implementation 'com.tuyenmonkey:mkloader:1.4.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.github.vihtarb:tooltip:0.2.0'
implementation('com.github.ozodrukh:CircularReveal:2.0.1#aar') {
transitive = true;
}
// AUTO SCROLL VIEW PAGER
implementation('cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2') {
exclude module: 'support-v4'
}
implementation 'com.mindorks.android:prdownloader:0.5.0'
Don't
implementation 'com.google.firebase:firebase-perf:19.0.2'
implementation 'com.google.firebase:firebase-auth:19.1.0'
implementation 'com.google.firebase:firebase-messaging:20.0.1'
implementation 'com.google.firebase:firebase-core:17.2.1'
implementation ("com.firebaseui:firebase-ui-auth:4.1.0") {
exclude group: "android.arch.lifecycle"
exclude group: "com.android.support"
}
Try with
implementation 'com.google.firebase:firebase-perf:19.0.7'
implementation 'com.google.firebase:firebase-auth:19.3.1'
implementation 'com.google.firebase:firebase-core:17.4.3'
implementation 'com.google.firebase:firebase-messaging:20.2.1'
implementation 'com.firebaseui:firebase-ui-auth:6.2.0' // or 6.2.1

ERROR regarding Google Play Services library in build.gradle for Android

I am facing some issue regarding the build. I am trying to integrate the google photos api in my app. So, I added the below dependency:
implementation 'com.google.photos.library:google-photos-library-client:1.3.0'
After that, I am facing build issue due to some conflict:
ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[1.16.
1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: io.grpc:grpc-okhttp:1.16.1 -> io.grpc:grpc-core#[1.16.1], but grpc-core version was 1.21.0
Here I am posting all the dependencies:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.1.1'
implementation 'com.android.support:support-v4:28.1.1'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.firebaseui:firebase-ui:4.3.2'
implementation 'com.google.firebase:firebase-messaging:18.0.0'
// implementation 'com.google.firebase:firebase-database:17.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.ncorti:slidetoact:0.3.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.android.gms:play-services-places:16.1.0'
implementation 'com.google.android.gms:play-services-drive:16.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation 'com.mikepenz:materialdrawer:6.1.1'
implementation 'com.akexorcist:googledirectionlibrary:1.1.1'
implementation 'com.roughike:bottom-bar:2.3.1'
implementation 'com.google.api-client:google-api-client-android:1.23.0' exclude module: 'httpclient'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.google.http-client:google-http-client-gson:1.23.0' exclude module: 'httpclient'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.gms:play-services-vision:17.0.2'
implementation 'com.google.photos.library:google-photos-library-client:1.3.0'
// JSON Parsing
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.github.vipulasri:timelineview:1.0.6'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.seatgeek:placesautocomplete:0.3-SNAPSHOT'
implementation 'com.tbuonomo.andrui:viewpagerdotsindicator:2.1.2'
implementation('com.google.apis:google-api-services-drive:v3-rev136-1.25.0') {
exclude group: 'org.apache.httpcomponents'
}
implementation('android.arch.work:work-runtime:1.0.0-alpha11') {
exclude group: 'com.google.guava', module: 'listenablefuture'
}
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.android.gms:play-services-plus:16.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.google.apis:google-api-services-classroom:v1-rev135-1.23.0'
implementation 'com.google.android.gms:play-services-identity:16.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.robertlevonyan.view:MaterialChipView:1.2.5'
implementation 'com.google.apis:google-api-services-calendar:v3-rev305-1.23.0'
implementation 'com.aurelhubert:ahbottomnavigation:2.3.4'
implementation 'us.belka:androidtoggleswitch:1.2.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation "org.igniterealtime.smack:smack-tcp:4.1.0"
// Optional for XMPPTCPConnection
implementation "org.igniterealtime.smack:smack-android-extensions:4.1.0"
}
apply plugin: 'com.google.gms.google-services'

Paytabs android integration- Program type already present: okhttp3.Authenticator

I integrate PayTabs payment getaway in my project
it run correct on my debugging version
then get this error when generate signing apk from my project
this error appear when generate sign apk
and this is my gradle dependences
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:gridlayout-v7:26.1.0'
implementation 'com.android.support:multidex:1.0.1'
implementation 'com.github.siyamed:android-shape-imageview:0.9.+#aar'
implementation 'com.google.code.gson:gson:2.6.1'
implementation 'com.github.fccaikai:AndroidPermissionX:1.0.0'
implementation 'com.googlecode.android-query:android-query:0.25.9'
implementation 'com.wang.avi:library:2.1.3'
implementation 'com.github.rrsystems:utilsplus:1.1.0'
implementation 'com.romandanylyk:pageindicatorview:0.0.7'
implementation 'com.github.ragunathjawahar:android-saripaar:android-saripaar-2.0.3'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'jp.wasabeef:picasso-transformations:2.2.1'
implementation 'com.github.chrisbanes:PhotoView:1.3.1'
implementation 'com.facebook.fresco:fresco:1.8.0'
implementation 'com.github.stfalcon:frescoimageviewer:0.5.0'
implementation 'com.intuit.sdp:sdp-android:1.0.4'
implementation 'com.intuit.ssp:ssp-android:1.0.4'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'io.nlopez.smartlocation:library:3.3.1'
implementation project(':PayTabs_SDK')
I also got same problem after long research fortunately i find solution and here it's
configurations {
all*.exclude group: 'com.squareup.okio'
all*.exclude group: 'com.squareup.okhttp3'
all*.exclude group: 'com.android.support', module : 'support-v13'
}
Just put this code in app folder build.gradle file, it's look like
configurations {
all*.exclude group: 'com.squareup.okio'
all*.exclude group: 'com.squareup.okhttp3'
all*.exclude group: 'com.android.support', module : 'support-v13'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
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.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.squareup.retrofit2:converter-gson:2.2.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation project(':paytabs_SDK')
}
Paytabs SDK is using okhttp jar file, you can exclude okhttp by configuration
android {
configurations {
all*.exclude group: 'com.squareup.okhttp3', module: 'okhttp'
}
}
https://github.com/JakeWharton/picasso2-okhttp3-downloader/issues/1#issuecomment-413993079

All gms/firebase libraries must use the exact same version

I've made sure that the Firebase libraries are using the same version. However, it's saying:
All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 15.0.0, 12.0.1. Examples include com.google.android.gms:play-services-ads-identifier:15.0.0 and com.google.android.gms:play-services-auth:12.0.
Gradle file:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// Android Support
implementation "com.android.support:appcompat-v7:$androidSupportVersion"
implementation "com.android.support:customtabs:$androidSupportVersion"
implementation "com.android.support:support-v4:$androidSupportVersion"
implementation "com.android.support:design:$androidSupportVersion"
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation "com.android.support:cardview-v7:$androidSupportVersion"
// Google Play & Firebase
implementation "com.google.android.gms:play-services-location:15.0.0"
implementation 'com.google.firebase:firebase-database:15.0.0'
implementation 'com.firebaseui:firebase-ui:3.3.0'
// Dagger
implementation "com.google.dagger:dagger:$daggerVersion"
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
// Network
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava:$retrofitVersion"
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
implementation "com.squareup.okhttp3:okhttp-urlconnection:$okHttpVersion"
implementation "com.squareup.okhttp3:logging-interceptor:$okHttpVersion"
implementation "com.facebook.stetho:stetho:$stethoVersion"
implementation "com.facebook.stetho:stetho-okhttp3:$stethoVersion"
implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion"
// RX
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.1.6'
// Misc
implementation 'com.github.amarjain07:StickyScrollView:1.0.2'
implementation 'com.yakivmospan:scytale:1.0.1'
implementation "com.jakewharton:butterknife:$butterKnifeVersion"
annotationProcessor "com.jakewharton:butterknife-compiler:$butterKnifeVersion"
implementation 'com.github.jkwiecien:EasyImage:2.0.3'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.github.ganfra:material-spinner:2.0.0'
implementation 'me.zhanghai.android.materialprogressbar:library:1.4.2'
implementation("com.github.hotchemi:permissionsdispatcher:$permissonDispatcherVersion") {
exclude module: "support-v13"
}
annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:$permissonDispatcherVersion"
implementation 'com.facebook.rebound:rebound:0.3.8'
implementation 'com.github.stfalcon:chatkit:0.2.2'
implementation 'nl.dionsegijn:konfetti:1.1.0'
implementation group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.56'
implementation 'com.android.support:multidex:1.0.3'
}
Check your transitive dependencies.
Simply run
gradlew [module]:dependencies
This will print a list for all dependencies and their dependencies.
Probably one of your "top level dependencies" includes a older version.
A solution would be to exclude these by saying:
implementation("com.example.m:m:1.0") {
exclude group: "org.unwanted", module: "x"
}

Categories

Resources