gpt4 book ai didi

android - 添加 Google Photos API 依赖项时发现重复的类

转载 作者:行者123 更新时间:2023-12-02 12:44:56 25 4
gpt4 key购买 nike

添加谷歌照片库 api 依赖项后抛出重复类发现错误

'com.google.photos.library:google-photos-library-client:1.5.0'


.尝试了 SO 中存在的几乎所有解决方案,但没有任何效果。
我的 Gradle(模块)文件(依赖项)
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// implementation project(':gcm')


//design
implementation 'androidx.appcompat:appcompat:1.2.0-alpha03'
implementation "com.google.android.material:material:${design_version.design}"
implementation "androidx.cardview:cardview:${design_version.card_view}"
implementation "androidx.recyclerview:recyclerview:${design_version.recycler_view}"
implementation 'com.balysv:material-ripple:1.0.2'
implementation "androidx.constraintlayout:constraintlayout:${design_version.constant_layout}"
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.makeramen:roundedimageview:2.3.0'

implementation 'se.emilsjolander:StickyScrollViewItems:1.1.0'
implementation 'androidx.multidex:multidex:2.0.1'
//image view
implementation 'com.squareup.picasso:picasso:2.71828'

//facebook integration
implementation 'com.facebook.android:account-kit-sdk:4.37.0'

//image cropper
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.+'

//chart
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
//glide
implementation 'com.github.bumptech.glide:glide:4.9.0'

//retrofit & square ok http & gson
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'
implementation "com.squareup.okhttp3:okhttp-urlconnection:3.0.1"
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'com.google.code.gson:gson:2.8.6'

//firebase
implementation 'com.google.firebase:firebase-core:17.4.3'
implementation 'com.google.firebase:firebase-messaging:20.2.1'
implementation 'com.google.firebase:firebase-inappmessaging-display:19.0.7'
implementation 'com.google.firebase:firebase-analytics:17.4.3'
implementation 'com.google.firebase:firebase-config-ktx:19.1.4'
implementation 'com.google.firebase:firebase-database-ktx:19.3.1'

//validator
implementation 'com.github.SoumikBhatt.toaster:validator:1.2.6'
//popup
implementation 'com.github.SoumikBhatt.toaster:custompopup:1.2.6'
//proToast
implementation 'com.github.SoumikBhatt:ToastLikeAPro:1.0.1'
//Utils
implementation 'com.github.SoumikBhatt:Utills:1.0.1'
//force update
implementation 'com.github.SoumikBhatt:PushNotification:1.1.5'

//lottie
implementation 'com.airbnb.android:lottie:3.4.0'

//spotlight
implementation 'com.github.takusemba:spotlight:2.0.1'

//google photos
implementation 'com.google.photos.library:google-photos-library-client:1.5.0'

//flurry
// api 'com.flurry.android:analytics:12.0.3@aar'
implementation 'com.flurry.android:analytics:12.2.0'

implementation 'com.google.android.gms:play-services-base:17.3.0'
implementation 'com.google.android.gms:play-services-auth:18.0.0'
implementation 'com.baoyz.swipemenulistview:library:1.3.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
testImplementation 'junit:junit:4.12'

androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation "androidx.core:core-ktx:1.1.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
完全错误:
Duplicate class com.google.api.Advice found in modules jetified-proto-google-common-protos-1.17.0.jar (com.google.api.grpc:proto-google-common-protos:1.17.0) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.api.Advice$1 found in modules jetified-proto-google-common-protos-1.17.0.jar (com.google.api.grpc:proto-google-common-protos:1.17.0) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
.
.
.

Go to the documentation to learn how to Fix dependency resolution errors.

任何形式的帮助将不胜感激。 TIA

最佳答案

似乎 Firebase 具有类似的依赖关系。尝试抑制 gradle 中的依赖项之一
在依赖项下像这样:

configurations.implementation.exclude(group: 'com.google.firebase', module: 'protolite-well-known-types') 
它应该是类似的东西。
引用 here

关于android - 添加 Google Photos API 依赖项时发现重复的类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62639939/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com