我正在使用此开源键盘代码。 https://github.com/AnySoftKeyboard/AnySoftKeyboard。 我想将Google Drive集成到应用程序中。我面临的问题是,当我添加此
时 implementation ('com.google.http-client:google-http-client-gson:1.28.0'){
exclude group: 'com.google.code.findbugs'
exclude module: 'annotations'
exclude group: 'javax.annotation.CheckReturnValue'
}
implementation('com.google.api-client:google-api-client-android:1.28.0'){
exclude group: 'com.google.code.findbugs'
exclude module: 'annotations'
exclude group: 'javax.annotation.CheckForSigned'
exclude group: 'org.apache.httpcomponents'
exclude group: 'javax.annotation.CheckReturnValue'
}
implementation('com.google.apis:google-api-services-drive:v3-rev136-1.25.0'){
exclude group: 'org.apache.httpcomponents'
exclude module: 'annotations'
exclude group: 'javax.annotation.CheckForSigned'
exclude group: 'javax.annotation.CheckReturnValue'
}
由于这些库,它使我不断显示此错误
AGPBI: {"kind":"error","text":"Program type already present: javax.annotation.CheckReturnValue","sources":[{}],"tool":"D8"}
* What went wrong:
Execution failed for task
':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging
dex archives:
Learn how to resolve the issue at
https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: javax.annotation.CheckReturnValue
我已经尝试使用排除模块,并且组仍然显示错误。 我正在使用Google Drive Rest API。这个https://developers.google.com/drive/api/v3/about-sdk 请帮助我。