Как я могу исправить повторяющуюся зависимость в Android Studio?Android

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Как я могу исправить повторяющуюся зависимость в Android Studio?

Сообщение Anonymous »

Я пытаюсь скомпилировать и собрать свой проект, но всякий раз, когда я создаю свой проект, я получаю повторяющиеся ошибки, и это всегда происходит, когда я добавляю зависимость от Firebase в свой проект. Я решил первую проблему, исследуя онлайн, и добавил эту реализацию реализации ' com.google.guava:guava:27.0.1-android', чтобы исправить конфликт, теперь я добавил новую зависимость Firebase, которая является реализацией 'com.google.firebase:firebase-config:16.1.0''< /code>Мне все еще не удается создать свое приложение.
Дубликат класса com.google.android.gms.measurement.internal.zzu найден в модулях jetified-firebase-analytics-impl-16.2. 2-время выполнения (com.google.firebase:firebase-analytics-impl:16.2.2) и время выполнения jetified-play-services-measurement-18.0.2 (com.google.android.gms:play-services-measurement:18.0 .2)
D
ниже приведен мой код build.gradle

Код: Выделить всё

apply plugin: 'com.android.application'

android {

compileSdkVersion 30
buildToolsVersion '29.0.3'

defaultConfig {
applicationId "com.sckoolboy.app"
minSdkVersion 19
targetSdkVersion 30
versionCode 20210420
versionName '5.1.1'
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}

dexOptions {
javaMaxHeapSize = "4g"
jumboMode true
}

buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

productFlavors {
}
}

dependencies {
implementation  fileTree(include: ['*.jar'], dir:  'libs')
implementation 'com.github.vivchar:ViewPagerIndicator:1.1.0'
implementation 'com.squareup.retrofit2:retrofit:2.7.2'
implementation 'com.squareup.retrofit2:converter-gson:2.7.2'
implementation 'com.jakewharton.timber:timber:4.7.1'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.squareup.okhttp3:logging-interceptor:4.4.1'
implementation 'com.google.firebase:firebase-config:16.1.0'

implementation 'com.anjlab.android.iab.v3:library:1.1.0'
implementation 'com.facebook.android:facebook-login:6.3.0'
implementation 'com.facebook.android:audience-network-sdk:5.11.0'
implementation 'com.google.android.ads.consent:consent-library:1.0.8'
implementation 'devlight.io:navigationtabbar:1.2.5'
implementation 'com.miguelcatalan:materialsearchview:1.4.0'
implementation 'com.github.bhargavms:DotLoader:1.1.1'
implementation 'com.leinardi.android:speed-dial:2.0.1'
implementation 'com.orhanobut:hawk:2.0.1'
implementation 'com.github.codemybrainsout:smart-app-rate:1.0.8'
implementation 'com.google.android.exoplayer:exoplayer:2.10.8'
implementation 'com.google.android.exoplayer:exoplayer-core:2.10.8'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.10.8'
implementation 'com.gauravk.bubblenavigation:bubblenavigation:1.0.7'
implementation "com.google.android.gms:play-services-location:17.0.0"
implementation 'com.github.joielechong:countrycodepicker:2.4.2'
implementation 'com.squareup.okhttp3:okhttp:4.4.1'
implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2'
implementation 'com.github.GrenderG:Toasty:1.4.2'

implementation 'com.google.android.play:core:1.10.0'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.github.chrisbanes.photoview:library:1.2.3'
implementation 'com.facebook.android:facebook-android-sdk:5.15.3'
implementation 'com.mikhaellopez:circularimageview:3.2.0'
implementation 'com.squareup.okhttp:okhttp:2.5.0'
implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
implementation 'androidx.mediarouter:mediarouter:1.2.1'
implementation 'androidx.browser:browser:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.balysv:material-ripple:1.0.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.android.gms:play-services-auth:18.1.0'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-ads:19.3.0'
implementation 'com.google.firebase:firebase-core:18.0.2'
implementation 'com.google.firebase:firebase-ads:19.7.0'
implementation 'com.google.firebase:firebase-messaging:21.1.0'
implementation 'com.google.firebase:firebase-analytics:18.0.2'
implementation 'com.google.firebase:firebase-storage:19.1.1'
implementation 'com.google.firebase:firebase-firestore:21.4.2'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
implementation 'com.google.android.gms:play-services-ads:19.7.0'
implementation 'com.google.android.gms:play-services-location:17.1.0'
implementation 'com.google.android.gms:play-services-auth:19.0.0'
implementation 'com.android.billingclient:billing:3.0.2'
implementation 'com.google.android.exoplayer:exoplayer:2.7.2'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.android.material:material:1.3.0-alpha03'
implementation 'androidx.viewpager2:viewpager2:1.0.0'
implementation 'com.google.guava:guava:27.0.1-android'

testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'jp.wasabeef:richeditor-android:1.2.2'
implementation 'com.github.QuadFlask:colorpicker:0.0.13'
implementation  files('libs/YouTubeAndroidPlayerApi.jar')
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
}

apply plugin: 'com.google.gms.google-services'
Пожалуйста, что я делаю не так? 1 миллион благодарностей за вашу помощь.

Подробнее здесь: https://stackoverflow.com/questions/671 ... oid-studio
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»