亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

錯誤:任務 ':app:transformClassesWithJarMerging'

錯誤:任務 ':app:transformClassesWithJarMerging'

慕仙森 2023-04-13 15:51:30
我是安卓的新手。我正在嘗試在我的應用程序中添加 Google 登錄功能,但是當我com.google.android.gms:play-services-auth:17.0.0在我的build.gradle文件中添加時,我收到以下錯誤:Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: androidx/versionedparcelable/CustomVersionedParcelable.class請提出解決方案,我花了一整天但無法得到解決方案。Build.gradle代碼是:apply plugin: 'com.android.application'android {    compileSdkVersion 28    buildToolsVersion "29.0.1"    defaultConfig {        multiDexEnabled true        applicationId "com.example.mawai.smartlearn"        minSdkVersion 15        targetSdkVersion 26        versionCode 1        versionName "1.0"        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }    }}dependencies {     compile 'com.android.support:multidex:1.0.0'    compile fileTree(dir: 'libs', include: ['*.jar'])    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {        exclude group: 'com.android.support', module: 'support-annotations'    })    // compile 'com.android.support:appcompat-v7:26.+'     compile 'com.android.support:appcompat-v7:28.0.0'    compile 'com.android.support.constraint:constraint-layout:1.0.2'    testCompile 'junit:junit:4.12'     compile 'com.google.android.gms:play-services-auth:17.0.0'}
查看完整描述

1 回答

?
一只甜甜圈

TA貢獻1836條經驗 獲得超5個贊

在 17.0.0 及以上版本中,您需要使用 AndroidX,因此您有2 個選擇

1) 將com.google.android.gms:play-services-auth降級到舊版本

2) 將 AndroidX 添加/遷移到您的應用(推薦)


查看完整回答
反對 回復 2023-04-13
  • 1 回答
  • 0 關注
  • 123 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號