Есть ли android x зависимость для navigation?

160
30 ноября 2018, 18:20

Вот решил попробовать поработать с Navigation Architecture component

https://developer.android.com/topic/libraries/architecture/navigation/

и не могу понять , что я делаю не так

Вот мой градл зависимостей

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//android
implementation "androidx.appcompat:appcompat:${libs.supportVersion}"
implementation "androidx.constraintlayout:constraintlayout:${libs.constraintLayout}"
//Stetho
implementation "com.facebook.stetho:stetho:${libs.stetho}"
//Crashlitics
implementation('com.crashlytics.sdk.android:crashlytics:2.9.5@aar') {
    transitive = true
}
//RxJava2
implementation "io.reactivex.rxjava2:rxjava:${libs.rx2Java}"
implementation "io.reactivex.rxjava2:rxandroid:${libs.rx2Android}"
//Dependency Injection
implementation "com.google.dagger:dagger:${libs.daggerVersion}"
implementation 'androidx.appcompat:appcompat:1.0.0-rc02'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
annotationProcessor "com.google.dagger:dagger-compiler:${libs.daggerVersion}"
//Timber
implementation "com.jakewharton.timber:timber:${libs.timber}"
//Architecture components
implementation "androidx.lifecycle:lifecycle-extensions:${libs.lifecycle_component}"
annotationProcessor "androidx.lifecycle:lifecycle-compiler:${libs.lifecycle_component}"
// Retrofit 2
implementation "com.squareup.retrofit2:retrofit:${libs.retrofit2}"
implementation "com.squareup.retrofit2:adapter-rxjava2:${libs.retrofit2}"
implementation "com.squareup.retrofit2:converter-moshi:${libs.retrofit2}"
implementation "com.squareup.okhttp3:logging-interceptor:${libs.retrofitInterseptor}"
//test
testImplementation "junit:junit:${test.junit}"
androidTestImplementation "androidx.test:runner:${test.runner}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
androidTestImplementation "androidx.test.espresso:espresso-core:${test.espresso}"
}

все работает на android x зависимостях

Но если мы хотим попробовать поработать с навигацией нужно добавить следующую зависимость

implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha05'

и как только мы ее добавляем, то при компиляции получаем вот такую ошибку

Error: Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver

Как мы знаем, android x не поддерживает использование библиотек support

а эта ошибка возникает именно по причине того, что где то в недрах этой зависимости используется support

Я начал искать в migrate файле https://developer.android.com/topic/libraries/support-library/refactor как заменить эту зависимость на android x, но там этого нет.

Вопрос как это сделать? Есть ли тут человек который пробовал использовать Navigation Architecture component вместе и android x зависимостями?

READ ALSO
Запись файлов, производительность

Запись файлов, производительность

При параллельной многопоточности, с точки зрения производительности, важен ли порядок следования записей в выходных файлах?

179
Поменять логин на имя Chat App

Поменять логин на имя Chat App

Я создал приложение-мессенджер на FirebaseПо принципу одного общего чата

182
как получить файл из network, используя java+selenium+webdriver

как получить файл из network, используя java+selenium+webdriver

Нужно получить файл из network, во вкладке HeadersИз localStorage получаю значение переменной как-то так:

196
AspectJ до загрузка аспектов

AspectJ до загрузка аспектов

Есть программа -jar

173