Android build failed after installing navigation component - android

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

Related

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'

Gradle: Error: Program type already present: androidx.activity.R$attr

When adding
implementation
('com.google.android.ads.consent:consent-library:1.0.0') {
exclude module: 'androidx.activity'
}
to my app/build.gradle file i get this error:
Error: Program type already present: androidx.activity.R$attr
What i did do:
1. gradlew androidDependencies
But i cannot find any duplicates
Read: https://developer.android.com/studio/build/dependencies#duplicate_classes.
Other stackoverflow answers suggesting excluding support library versions dont help me
repositories {
maven { url 'https://maven.fabric.io/public' }
}
configurations {
all*.exclude group: 'com.google.guava', module: 'listenablefuture'
}
configurations.all {exclude group: 'com.android.support', module: 'support-v13'}
dependencies {
def nav_version = "1.0.0"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
implementation 'androidx.core:core-ktx:1.1.0-alpha05'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.2-alpha02'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha02'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test:rules:1.1.1'
androidTestImplementation 'androidx.test:core-ktx:1.1.0'
implementation "com.vorlonsoft:androidrate:1.2.1"
implementation 'com.github.THEAccess:SuspendRx:1.0.10'
implementation 'com.github.THEAccess:privacydialog:0.1.0'
implementation 'com.google.android.material:material:1.1.0-alpha04'
implementation 'com.yqritc:android-scalablevideoview:1.0.4'
implementation 'com.timqi.sectorprogressview:library:2.0.1'
implementation 'com.github.Angtrim:Android-Five-Stars-Library:v3.1'
implementation 'com.stepstone.apprating:app-rating:2.3.0'
implementation 'com.google.firebase:firebase-dynamic-links:16.1.8'
implementation 'com.google.firebase:firebase-ads:16.0.1'
api ('com.google.android.ads.consent:consent-library:1.0.0') {
exclude module: 'androidx.activity'
}
//Navigation
implementation "android.arch.navigation:navigation-fragment-ktx:$nav_version"
implementation "android.arch.navigation:navigation-ui-ktx:$nav_version"
implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0'
//Kodein
def kodein_version = "6.0.1"
implementation "org.kodein.di:kodein-di-generic-jvm:$kodein_version"
implementation "org.kodein.di:kodein-di-framework-android-x:$kodein_version"
implementation "org.kodein.di:kodein-di-conf-jvm:$kodein_version"
//Firebase
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-config:16.4.0'
implementation 'com.google.firebase:firebase-perf:16.2.4'
implementation 'com.google.firebase:firebase-firestore:18.1.0'
implementation 'com.google.firebase:firebase-auth:16.2.0'
implementation 'com.google.firebase:firebase-inappmessaging-display:17.1.0'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.9#aar') {
transitive = true;
}
implementation 'androidx.cardview:cardview:1.0.0'
}
Please help me understanding where the dependencies have duplicates
I had the same problem. Just using the Clean Project option and building it again worked for me...
It took me two days to fix it but here is the fix:
implementation ('com.google.android.ads.consent:consent-library:1.0.0') {
exclude group: 'androidx'
}

error: package rx.android.schedulers does not exist after changing compilesdk

Hi I updated my gradle and android studio and since then I started getting build errors.
Once I changed compileSdkVersionto 28, I started getting error: package rx.android.schedulers does not exist
I also get this error in my build as shown in the pic bellow
Here are my dependencies from build.gradle
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: "$buildDir/native-libs", include: 'native-libs.jar')
implementation 'com.android.support:multidex:1.0.2'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.jenzz.appstate:appstate:3.0.1'
implementation 'com.jenzz.appstate:adapter-rxjava2:3.0.1'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation group: 'joda-time', name: 'joda-time', version: '2.3'
implementation 'com.mikhaellopez:circularprogressbar:1.1.1'
implementation 'io.realm:android-adapters:2.0.0'
implementation 'com.jakewharton.rxbinding2:rxbinding-recyclerview-v7:2.0.0'
implementation 'com.github.arimorty:floatingsearchview:2.1.1'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.laimiux.rxnetwork:rxnetwork:0.0.4'
// implementation 'org.opencv:opencv-android:2.4.8'
// implementation group: 'com.github.andrejlukasevic', name: 'document-scanner', version: '4.0.0'
// implementation 'com.mlsdev.rximagepicker:library:2.0.2'
implementation 'com.google.firebase:firebase-messaging:15.0.0'
debugImplementation 'com.21buttons:fragment-test-rule:1.0.0'
//Retrofit, RxJava and OkHttp,Gson,Dagger,ButterKnife.
implementation 'com.squareup.retrofit2:retrofit:2.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
implementation 'frankiesardo:icepick:3.1.0'
annotationProcessor 'frankiesardo:icepick-processor:3.1.0'
implementation group: 'com.squareup.retrofit2', name: 'adapter-rxjava2', version: '2.2.0'
implementation 'io.michaelrocks:libphonenumber-android:8.9.0'
implementation ('com.google.dagger:dagger:2.0.2'){
exclude group: 'com.google.guava'
}
annotationProcessor ('com.google.dagger:dagger-compiler:2.0.2'){
exclude group: 'com.google.guava'
}
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compileOnly 'javax.annotation:jsr250-api:1.0'
implementation 'com.android.support:support-annotations:24.2.0'
implementation 'com.jakewharton.rxrelay2:rxrelay:2.0.0'
implementation 'com.jakewharton.rxrelay:rxrelay:1.1.0'
implementation 'com.futuremind.recyclerfastscroll:fastscroll:0.2.5'
implementation group: 'io.reactivex.rxjava2', name: 'rxandroid', version: '2.0.1'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.0'
implementation 'com.jakewharton.timber:timber:4.5.1'
implementation 'com.google.code.gson:gson:2.5'
implementation 'com.squareup.retrofit2:retrofit-mock:2.1.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.github.fafaldo:fab-toolbar:1.2.0'
implementation 'com.instabug.library:instabug:8.1.1'
implementation 'com.wdullaer:materialdatetimepicker:3.5.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'net.hockeyapp.android:HockeySDK:4.1.5'
implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.0.0'
implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.4#aar'
implementation group: 'com.joooonho', name: 'selectableroundedimageview', version: '1.0.1'
implementation 'com.mixpanel.android:mixpanel-android:5.+'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5'
//releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.9.5'
testImplementation 'com.google.dexmaker:dexmaker:1.1'
testImplementation 'org.powermock:powermock-api-mockito:1.6.4'
testImplementation 'org.powermock:powermock-module-junit4:1.6.4'
testImplementation 'org.powermock:powermock-core:1.6.4'
testImplementation 'org.powermock:powermock-module-junit4-rule:1.5.4'
testImplementation 'org.powermock:powermock-classloading-base:1.6.4'
testImplementation 'org.powermock:powermock-classloading-xstream:1.5.4'
testImplementation 'org.powermock:powermock-module-testng:1.6.4'
testImplementation 'com.squareup.retrofit2:retrofit:2.1.0'
testImplementation 'com.squareup.retrofit2:converter-gson:2.1.0'
}
my java file where I am getting the error
import rx.android.schedulers.AndroidSchedulers;
#Override
protected void onResume() {
super.onResume();
DoPayApplication.updateIsAppLive(Boolean.TRUE);
publishRelay.call(StartStopAppMonitor.START_STOP_APP_MONITOR);
compositeSubscription.add(publishRelay.asObservable().observeOn(AndroidSchedulers.mainThread()).subscribe(iView -> {
I changed the import to use
import io.reactivex.android.schedulers.AndroidSchedulers;
That gave me this error
When i was with compileSdkVersion 26 it did not give me this error with respect to rxAndroid/rxJava.
This started after changing compileSdkVersion to 28
I am really confused, could you please shed some light on how to fix this.
Thanks
R
first of all, when you start using API 28, you need to start migrating to AndroidX
for example, change: implementation 'com.android.support:appcompat-v7:28.0.0'
to: implementation 'androidx.appcompat:appcompat:1.0.0' and i think your first error gets fixed.
this solved my issues
implementation 'io.reactivex:rxjava:1.0.12'

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