I am getting DexArchiveMergerException when adding the com.android.support:leanback-v17 library to my Gradle dependencies. My supportLibraryVersion is 26.0.1.
My dependencies are:
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.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:cardview-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:design:$rootProject.supportLibraryVersion"
implementation "com.android.support:recyclerview-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:support-v4:$rootProject.supportLibraryVersion"
implementation "com.android.support:palette-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:mediarouter-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:leanback-v17:$rootProject.supportLibraryVersion"
implementation "com.android.support.constraint:constraint-layout:$rootProject.constraintVersion"
implementation "com.squareup.picasso:picasso:$rootProject.picassoVersion"
implementation "com.squareup.okhttp3:okhttp:$rootProject.okhttpVersion"
implementation "de.hdodenhof:circleimageview:$rootProject.circleimageviewVersion"
implementation "com.android.volley:volley:$rootProject.volleyVersion"
implementation "com.google.android.exoplayer:exoplayer-core:$rootProject.exoplayerVersion"
implementation "com.google.android.exoplayer:exoplayer-ui:$rootProject.exoplayerVersion"
implementation "com.google.android.exoplayer:exoplayer-hls:$rootProject.exoplayerVersion"
implementation "com.google.dagger:dagger:$rootProject.daggerVersion"
implementation "com.google.dagger:dagger-android:$rootProject.daggerVersion"
implementation "com.google.dagger:dagger-android-support:$rootProject.daggerVersion"
annotationProcessor "com.google.dagger:dagger-compiler:$rootProject.daggerVersion"
annotationProcessor "com.google.dagger:dagger-android-processor:$rootProject.daggerVersion"
implementation "com.jakewharton:butterknife:$rootProject.butterknifeVersion"
annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.butterknifeVersion"
implementation "io.reactivex.rxjava2:rxandroid:$rootProject.rxJavaVersion"
implementation "io.reactivex.rxjava2:rxjava:$rootProject.rxJavaVersion"
implementation "com.google.android.gms:play-services-cast:$rootProject.playServicesVersion"
implementation "com.google.android.gms:play-services-cast-framework:$rootProject.playServicesVersion"
implementation "com.google.android.gms:play-services-ads:$rootProject.playServicesVersion"
implementation "com.google.android.gms:play-services-auth:$rootProject.playServicesVersion"
implementation "com.google.firebase:firebase-messaging:$rootProject.playServicesVersion"
testImplementation "junit:junit:$rootProject.junitVersion"
}
I am getting the following error:
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
How do I solve this?
After long time searching, this worked for me:
delete .gradle folder
perform a Build > Clean Project.
Hope it's ok for your.
Related
I'm trying to build android project with navigation component.
My android project is written by both java and kotlin with some third party libraries(some library is very old).
When I add the following code into my app's build.gradle file in order to install navigation component as gogole site described([navigation component][1])
dependencies {
def nav_version = "2.3.3"
// Java language implementation
implementation "androidx.navigation:navigation-fragment:$nav_version"
implementation "androidx.navigation:navigation-ui:$nav_version"
// Kotlin
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
// Feature module Support
implementation "androidx.navigation:navigation-dynamic-features-fragment:$nav_version"
// Testing Navigation
androidTestImplementation "androidx.navigation:navigation-testing:$nav_version"
// Jetpack Compose Integration
implementation "androidx.navigation:navigation-compose:1.0.0-alpha05"
}
After that my project build failed with following error.
Execution failed for task ':<<ProjectName>>:transformClassesWithByteCodeTransformForDebug'.
> java.util.concurrent.ExecutionException: java.lang.RuntimeException: cannot find META-INF.versions.9.module-info: module-info found in META-INF/versions/9/module-info.class
The module is java9 feature and module-info.class seems it is required with java9 even I compile my android project with java8.
I also added following statement as some back articles explained, but it's not helped.
packagingOptions {
exclude "**/module-info.class"
}
All Dependencies:
dependencies {
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
compile fileTree(include: ['*.jar'], dir: 'libs')
// Support library
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
// viewmodel
implementation "androidx.lifecycle:lifecycle-reactivestreams:2.1.0"
implementation "androidx.lifecycle:lifecycle-extensions:2.1.0"
implementation "androidx.lifecycle:lifecycle-runtime:2.1.0"
implementation "androidx.lifecycle:lifecycle-common-java8:2.1.0"
androidTestImplementation "androidx.arch.core:core-testing:2.1.0"
// room
implementation "androidx.room:room-runtime:2.2.3"
kapt "androidx.room:room-compiler:2.2.3"
implementation "androidx.room:room-rxjava2:2.2.3"
testImplementation "androidx.room:room-testing:2.2.3"
androidTestImplementation "androidx.room:room-testing:2.2.3"
// GMS
implementation "com.google.android.gms:play-services-maps:15.0.2"
implementation "com.google.android.gms:play-services-location:15.0.2"
implementation "com.google.android.gms:play-services-tagmanager:16.0.8"
// for Places SDK for Android
implementation "com.google.android.libraries.places:places-compat:1.1.0"
implementation 'com.google.maps.android:maps-ktx:1.5.0'
implementation 'com.google.maps.android:maps-utils-ktx:1.5.0'
// Google
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.guava:guava:14.0.1'
// Directions API
implementation "com.google.maps:google-maps-services:0.2.11"
// GreenDao
compile 'de.greenrobot:greendao:1.3.7'
// Util
compile 'com.deploygate:sdk:3.1'
// Firebase
implementation "com.google.firebase:firebase-core:16.0.9"
implementation "com.google.firebase:firebase-messaging:18.0.0"
implementation "com.google.firebase:firebase-dynamic-links:17.0.0"
implementation "com.google.firebase:firebase-config:17.0.0"
implementation 'com.google.firebase:firebase-crashlytics:17.2.2'
implementation 'com.google.firebase:firebase-analytics:17.6.0'
// AppsFlyer
implementation 'com.appsflyer:af-android-sdk:4.10.3#aar'
implementation 'com.android.installreferrer:installreferrer:1.0'
// Retrofit2
compile "com.squareup.retrofit2:retrofit:2.3.0"
compile "com.squareup.retrofit2:adapter-rxjava2:2.3.0"
compile "com.squareup.retrofit2:converter-moshi:2.3.0"
implementation("com.squareup.retrofit2:converter-simplexml:2.3.0") {
exclude group: 'xpp3', module: 'xpp3'
exclude group: 'stax', module: 'stax-api'
exclude group: 'stax', module: 'stax'
}
compile "com.squareup.retrofit2:retrofit-mock:2.3.0"
compile "com.squareup.okhttp3:okhttp:3.8.0"
testCompile "com.squareup.okhttp3:mockwebserver:3.8.0"
compile "com.squareup.okhttp3:logging-interceptor:3.8.0"
compile "com.squareup.moshi:moshi:1.5.0"
compile "com.squareup.moshi:moshi-kotlin:1.5.0"
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'io.reactivex.rxjava2:rxkotlin:2.2.0'
// dagger
implementation "com.google.dagger:dagger:2.25.4"
implementation "com.google.dagger:dagger-android:2.25.4"
implementation "com.google.dagger:dagger-android-support:2.25.4"
kapt "com.google.dagger:dagger-compiler:2.25.4"
kapt "com.google.dagger:dagger-android-processor:2.25.4"
kaptTest "com.google.dagger:dagger-compiler:2.25.4"
kaptAndroidTest "com.google.dagger:dagger-compiler:2.25.4"
kaptAndroidTestDebug "com.google.dagger:dagger-compiler:2.25.4"
implementation('com.github.bumptech.glide:glide:4.7.1') {
exclude group: 'com.android.support'
}
implementation('jp.wasabeef:glide-transformations:3.3.0'){
exclude group: 'com.android.support'
}
kapt 'com.github.bumptech.glide:compiler:4.5.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61"
implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.61"
// Kotlin Coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-rx2:1.3.3'
implementation 'com.jakewharton.timber:timber:4.6.0'
// RxRelay
implementation 'com.jakewharton.rxrelay3:rxrelay:3.0.0'
// for Test
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-web:3.2.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test:rules:1.2.0'
testCompile 'org.powermock:powermock-api-mockito2:1.7.3'
testCompile 'org.powermock:powermock-module-junit4:1.7.3'
testCompile 'org.mockito:mockito-core:2.19.0'
androidTestCompile 'org.mockito:mockito-android:2.19.0'
compile 'com.ethanhua:skeleton:1.0.0'
//flexbox
implementation 'com.google.android:flexbox:1.0.0'
// runtime permission
implementation "com.github.hotchemi:permissionsdispatcher:3.3.1"
kapt "com.github.hotchemi:permissionsdispatcher-processor:3.3.1"
// JTS
implementation 'org.locationtech.jts:jts-core:1.17.1'
// デバッグ用
debugImplementation 'com.facebook.stetho:stetho:1.5.1'
def nav_version = "2.3.3"
// Java language implementation
implementation "androidx.navigation:navigation-fragment:$nav_version"
implementation "androidx.navigation:navigation-ui:$nav_version"
// Kotlin
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
// Feature module Support
implementation "androidx.navigation:navigation-dynamic-features-fragment:$nav_version"
// Testing Navigation
androidTestImplementation "androidx.navigation:navigation-testing:$nav_version"
// Jetpack Compose Integration
implementation "androidx.navigation:navigation-compose:1.0.0-alpha05"
}
Could you please tell me how to solve this problem.
Thanks
[1]: https://developer.android.com/guide/navigation/navigation-getting-started?hl=ja
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'
Right now I have a project that has 3 modules, one app module and a streaming module that uses its own base module.
When I build this project, it always fails in the app:transformClassesWithDexBuilderForDev2Debug, and it's always this:
AbortException: Type com.google.android.gms.internal.measurements.zz<something> is referenced as an interface from com.google.android.gms.internal.measurements.zz<something else>
My app module's gradle looks like this:
...
ext {
supportLibVersion = '28.0.0';
gmsVersion = '15.0.0';
}
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation files('libs/libadapterinmobi.jar')
implementation project(':streaming')
implementation 'com.twitter.sdk.android:twitter-core:3.3.0'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.6#aar') {
transitive = true
}
implementation('com.redbricklane.zapr:zapr-sdk:3.2.1#aar') {
transitive = true;
}
implementation 'com.redbricklane.zapr.admob:zapr-admob-adapter:2.1#aar'
implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation "com.android.support:customtabs:$supportLibVersion"
implementation "com.android.support:design:$supportLibVersion"
implementation "com.android.support:cardview-v7:$supportLibVersion"
implementation "com.android.support:recyclerview-v7:$supportLibVersion"
implementation "com.android.support:palette-v7:$supportLibVersion"
implementation "com.android.support:support-v4:$supportLibVersion"
implementation "com.google.android.gms:play-services-location:16.0.0"
implementation "com.google.android.gms:play-services-analytics:16.0.4"
implementation "com.google.android.gms:play-services-ads:17.1.2"
implementation "com.google.android.gms:play-services-auth:16.0.1"
implementation "com.google.firebase:firebase-core:16.0.8"
implementation "com.google.firebase:firebase-inappmessaging-display:17.1.1"
implementation "com.google.firebase:firebase-messaging:17.5.0"
implementation "com.google.firebase:firebase-auth:16.2.0"
implementation "com.google.firebase:firebase-database:16.1.0"
implementation "com.google.firebase:firebase-config:16.4.1"
implementation "com.google.firebase:firebase-appindexing:17.1.0"
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.github.bumptech.glide:annotations:4.9.0'
implementation 'com.github.bumptech.glide:volley-integration:4.2.0#aar'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation('com.facebook.android:facebook-android-sdk:4.30.0') {
exclude group: 'com.google'
}
implementation 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'
implementation 'com.melnykov:floatingactionbutton:1.3.0'
implementation 'com.googlecode.mp4parser:isoparser:1.1.22'
implementation 'me.relex:circleindicator:1.2.1#aar'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.mixpanel.android:mixpanel-android:4.9.8'
implementation 'com.flurry.android:analytics:6.4.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'io.github.luizgrp.sectionedrecyclerviewadapter:sectionedrecyclerviewadapter:1.0.4'
implementation 'com.danikula:videocache:2.7.0'
implementation 'com.inmobi.monetization:inmobi-ads:7.2.1'
implementation 'commons-io:commons-io:2.5'
implementation 'com.github.livefront:bridge:v1.1.3'
implementation 'frankiesardo:icepick:3.2.0'
annotationProcessor 'frankiesardo:icepick-processor:3.2.0'
}
...
And my streaming module's gradle file looks like this:
...
androidExtensions {
experimental = true
}
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//implementation files('libs/libadapterinmobi.jar')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support.constraint:constraint-layout-solver:1.1.3'
implementation 'com.android.volley:volley:1.1.1'
implementation 'android.arch.lifecycle:extensions:1.1.1'
implementation 'android.arch.lifecycle:viewmodel:1.1.1'
implementation 'android.arch.lifecycle:livedata:1.1.1'
implementation 'android.arch.persistence.room:runtime:1.1.1'
implementation 'android.arch.paging:runtime:1.0.1'
implementation ("com.facebook.android:facebook-core:4.28.0") {
exclude group: 'com.google'
}
implementation('com.crashlytics.sdk.android:crashlytics:2.9.6#aar') {
transitive = true
}
//implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-invites:16.1.1'
//implementation 'com.google.firebase:firebase-messaging:17.5.0'
//implementation 'com.google.firebase:firebase-dynamic-links:16.1.8'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.exoplayer:exoplayer:2.9.1'
implementation 'com.google.android.exoplayer:extension-rtmp:2.9.1'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'com.github.bumptech.glide:okhttp3-integration:4.9.0'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.intuit.ssp:ssp-android:1.0.5'
implementation 'com.intuit.sdp:sdp-android:1.0.5'
implementation 'com.vinaysshenoy:mugen:1.0.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.github.florent37:viewtooltip:1.1.6'
implementation 'com.karumi:dexter:5.0.0'
implementation 'com.android.billingclient:billing:1.2'
implementation 'me.saket:better-link-movement-method:2.2.0'
implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'com.github.yalantis:ucrop:2.2.2'
implementation 'com.robinhood.ticker:ticker:2.0.1'
implementation project(':playtrivia-base')
//implementation project(':stepbarview')
annotationProcessor "com.github.bumptech.glide:compiler:4.9.0"
annotationProcessor "android.arch.persistence.room:compiler:1.1.1"
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'
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
maven { url "http://dl.bintray.com/amulyakhare/maven" }
maven { url "https://jitpack.io" }
mavenCentral()
}
...
Most of the posts regarding this error are found here and in github repos' issue pages, and all of them suggest excluding com.google in their gradle inclusion codes. The problem here is that I don't know which one to put that exclusion into, since I don't know which one uses com.google.android.gms.internal.measurements.<something>.
EDIT: I forgot to mention that all of the other solutions in those posts involve updating all the Firebase and play-services repos to their latest version. It doesn't work for me.
The project level androidDependencies Gradle task didn't help either (I had no hits when I searched for internal).
With all that, how do I even start debugging this?
com.google.android.gms:play-services are giving errors, they were working fine, but when I pres the run button in the for testing purpose the these all libraries just vanish. I don't know what to do ??
dependencies {
implementation('com.mikepenz:materialdrawer:4.4.6#aar') {
transitive = true
}
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'
})
//noinspection GradleCotestApimpatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.mikepenz:google-material-typeface:2.1.2.1#aar'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'com.mikepenz:google-material-typeface:2.1.2.1#aar'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.2.+'
implementation 'com.google.android.gms:play-services-analytics:16.0.6'
implementation 'com.google.firebase:firebase-ads:17.1.2'
implementation'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.android.support:cardview-v7:27.1.1'
testImplementation 'junit:junit:4.12'
implementation files('libs/gcm.jar')
implementation 'com.github.Commit451.YouTubeExtractor:youtubeextractor:2.1.0'
implementation 'com.itextpdf:itextpdf:5.1.1'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.akexorcist:RoundCornerProgressBar:2.0.3'
implementation 'com.github.rtoshiro.fullscreenvideoview:fullscreenvideoview:1.1.2'
implementation 'com.mikhaellopez:circularprogressbar:1.1.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'in.gauriinfotech:commons:1.0.8'
implementation 'com.github.rey5137:material:1.2.2'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation 'com.squareup.okhttp:okhttp:2.5.0'
implementation 'com.shamanland:xdroid-toaster:0.0.5'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'io.reactivex.rxjava2:rxjava:2.1.5'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'com.daasuu:animateHorizontalProgressBar:0.2.4'
}
apply plugin: 'com.google.gms.google-services'
had the same issue then I tried every answer, clean the code, rebuild project with graddle, invalidate the cache and restart, checking the dependency > classpath 'com.google.gms:google-services:4.0.1' , these were the most populated suggestions. but none of them worked, then I check my network connection that was poor, due to a long time for downloading dependency either it timed out or gave the same error. please check your connection first and then apply these solutions.
Android source code not running after updating project. It gives below error.
Program type already present: org.apache.http.auth.AuthSchemeProvider
Message{kind=ERROR, text=Program type already present: org.apache.http.auth.AuthSchemeProvider, sources=[Unknown source file], tool name=Optional.of(D8)}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation('com.github.danysantiago:sendgrid-android:1', {
exclude group: 'org.apache.httpcomponents.httpclient-android'
exclude group: 'org.apache.httpcomponents.httpclient'
})
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.github.mancj:MaterialSearchBar:0.6'
// Glide image library
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.makeramen:roundedimageview:2.2.1'
implementation 'io.card:android-sdk:5.5.0'
implementation 'com.roughike:bottom-bar:2.1.1'
implementation 'com.kaopiz:kprogresshud:1.0.5'
implementation 'com.jude:swipebackhelper:3.1.2'
implementation 'com.google.android.gms:play-services-analytics:8.4.0'
implementation 'com.journeyapps:zxing-android-embedded:3.2.0#aar'
implementation 'com.google.zxing:core:3.2.1'
implementation 'com.xwray:passwordview:1.0'
implementation 'com.github.javiersantos:AppUpdater:2.6.4'
/*implementation 'com.sun.mail:android-mail:1.5.5'
implementation 'com.sun.mail:android-activation:1.5.5'*/
implementation 'com.google.android.gms:play-services-location:8.4.0'
implementation 'it.sephiroth.android.library.targettooltip:target-tooltip-library:1.3.15'
implementation 'com.stripe:stripe-android:6.0.0'
implementation 'org.altbeacon:android-beacon-library:2.12.4'
implementation files('libs/volley.jar')
implementation 'com.shawnlin:number-picker:2.4.6'
implementation('com.crashlytics.sdk.android:crashlytics:2.6.6#aar') {
transitive = true;
}
implementation project(':NPLibrary')
}
Try to add this line
implementation('com.github.danysantiago:sendgrid-android:1', {
exclude group: 'org.apache.httpcomponents.httpclient-android'
exclude group: 'org.apache.httpcomponents.httpclient'
//add this line
exclude group: 'org.apache.http.auth'
})
Update 1
Remove this line
implementation files('libs/volley.jar')
Because you have already specified.
implementation fileTree(include: ['*.jar'], dir: 'libs')
if you have updated your android studio I've gotta say, there are some serious issues with new version of Android Studio, try this for starter
upgrade:
implementation 'com.google.android.gms:play-services-analytics:8.4.0'
implementation 'com.google.android.gms:play-services-location:8.4.0'
to:
implementation 'com.google.android.gms:play-services-analytics:12.0.1'
implementation 'com.google.android.gms:play-services-location:12.0.1'
then check your project level Gradle and add this line with exact same version:
classpath 'com.google.gms:google-services:3.2.0'
hope it help you out.