Android程序类型已存在:com.google.gson.annotations.JsonAdapter
我似乎无法解决这个问题。有什么解决办法吗 我在创建发布版本时遇到此错误。在调试模式下,项目工作正常。我尝试了许多解决方案,但似乎无法正常工作。如果需要任何帮助,将不胜感激。请告诉我是否还需要其他帮助Android程序类型已存在:com.google.gson.annotations.JsonAdapter,android,Android,我似乎无法解决这个问题。有什么解决办法吗 我在创建发布版本时遇到此错误。在调试模式下,项目工作正常。我尝试了许多解决方案,但似乎无法正常工作。如果需要任何帮助,将不胜感激。请告诉我是否还需要其他帮助 Error: Program type already present: com.google.gson.annotations.JsonAdapter 这是我在模块级的成绩: compileSdkVersion 29 buildToolsVersion "29.0.2"
Error: Program type already present: com.google.gson.annotations.JsonAdapter
这是我在模块级的成绩:
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.sms.instant"
minSdkVersion 21
targetSdkVersion 29
versionCode 152
versionName '5.6.7'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.config
}
buildTypes {
release {
debuggable true
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
aaptOptions { cruncherEnabled = false }
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
`dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.android.support:design:29.0.2'
implementation 'com.android.support:support-v4:29.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'com.an.customfontview:customfont:0.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'
implementation 'com.tuyenmonkey:mkloader:1.4.0'
implementation 'com.google.android.material:material:1.0.0'
implementation files('libs/android-query-full.0.26.7.jar')
implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.3'
implementation 'me.dm7.barcodescanner:zxing:1.9.13'
implementation 'com.android.support:multidex:1.0.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.github.lolucosmin:PermissionsWrapper:version_1.2'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.firebase:firebase-messaging:20.0.0'
implementation 'com.github.bumptech.glide:glide:4.10.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0'
implementation 'com.intuit.sdp:sdp-android:1.0.6'
implementation 'com.google.android.libraries.places:places:1.1.0'
/* dagger dependency for DI*/
implementation "com.google.dagger:dagger:2.13"
annotationProcessor "com.google.dagger:dagger-compiler:2.13"
compileOnly 'javax.annotation:jsr250-api:1.0'
implementation 'javax.inject:javax.inject:1'
/*RxJava lib*/
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation "io.reactivex.rxjava2:rxjava:2.1.8"
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
implementation 'nl.dionsegijn:konfetti:1.1.3'
implementation 'com.crystal:crystalrangeseekbar:1.1.1'
/* LiveData lib*/
implementation "androidx.lifecycle:lifecycle-extensions:2.1.0"
implementation "android.arch.lifecycle:runtime:1.1.1"
annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
implementation 'com.squareup.picasso:picasso:2.5.1'
implementation 'im.crisp:crisp-sdk:0.1.14'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation('com.shagi:material-datepicker:1.3') {
exclude group: 'com.android.support'
}
implementation 'com.github.lecho:hellocharts-android:v1.5.8'
implementation 'com.facebook.shimmer:shimmer:0.4.0'
implementation 'org.jetbrains:annotations:15.0'
implementation project(path: ':fingpay')
}
apply plugin: 'com.google.gms.google-services'
`
请共享显示库的gradle文件
implementation ('com.google.android.ads.consent:consent-library:1.0.6') {
exclude module: 'gson'
}
你得试试这样的东西。库中已存在导致冲突的库之一。谢谢
我尝试了这个解决方案,现在得到了这个。程序类型已经存在:com.google.gson.annotations.Expose