gpt4 book ai didi

android - 重复的 zip 条目 [97.jar :androidx/versionedparcelable/CustomVersionedParcelable. 类]

转载 作者:行者123 更新时间:2023-11-29 00:56:27 34 4
gpt4 key购买 nike

我在使用 android studio 3.0.1 时遇到了这个问题。

Error:Execution failed for task ':app:transformClassesWithMultidexlistForAlaminDebug'. > java.io.IOException: Can't write [E:\Study\SamarSol\Android\GiftClubCustomer\app\build\intermediates\multi-dex\alamin\debug\componentClasses.jar] (Can't read [E:\Study\SamarSol\Android\GiftClubCustomer\app\build\intermediates\transforms\desugar\alamin\debug\97.jar(;;;;;;**.class)] (Duplicate zip entry [97.jar:androidx/versionedparcelable/CustomVersionedParcelable.class]))

我尝试了很多解决方案,但仍然有错误。

我的 gradle 文件在这里:

apply plugin: 'com.android.application' 
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.perkssbazaar.member"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
manifestPlaceholders = [HOCKEYAPP_APP_ID: "d03e9318b41d4031a783d1cc2b316c81"] //hockey app
}

flavorDimensions "default"

dexOptions {
javaMaxHeapSize "4g"
}

productFlavors {
LondonDentalStudio {
defaultConfig.applicationId "com.perkssbazaar.member.LondonDentalStudio"
manifestPlaceholders = [
appIcon: "@mipmap/lds_appicon"
]
resValue "string", "app_name", "London Dental Studio"
}
alamin {
defaultConfig.applicationId "com.perkssbazaar.member.alamin"
manifestPlaceholders = [
appIcon: "@mipmap/alamin_appicon"
]
resValue "string", "app_name", "al-amin"
}
generic {
defaultConfig.applicationId "com.perkssbazaar.member"
manifestPlaceholders = [
appIcon: "@mipmap/perksslogo"
]
resValue "string", "app_name", "Perkss"
}
}
buildTypes {
debug {
productFlavors.LondonDentalStudio.buildConfigField "String", "flavor", "\"LondonDentalStudio\""
productFlavors.alamin.buildConfigField "String", "flavor", "\"alamin\""
productFlavors.generic.buildConfigField "String", "flavor", "\"generic\""
}
release {
productFlavors.LondonDentalStudio.buildConfigField "String", "flavor", "\"LondonDentalStudio\""
productFlavors.alamin.buildConfigField "String", "flavor", "\"alamin\""
productFlavors.generic.buildConfigField "String", "flavor", "\"generic\""

minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}

}

dependencies {
implementation 'com.android.support:support-compat:28.0.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:28.0.0'
compile 'com.android.support:design:28.0.0'
compile 'com.android.support:mediarouter-v7:28.0.0'
compile 'me.dm7.barcodescanner:zxing:1.9.8'
compile 'com.google.zxing:core:3.3.0'
compile 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
compile 'com.github.moondroid.coverflow:library:1.0'
compile 'com.android.support:cardview-v7:28.0.0'
compile 'com.cloudrail:cloudrail-si-android:2.6.5'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
//compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.daprlabs.aaron:swipedeck:2.0.6'
compile 'com.github.jrvansuita:PickImage:2.1.6'
compile 'com.squareup.picasso:picasso:2.5.2'
//compile 'com.google.android.gms:play-services:10.2.4'
compile 'com.google.android.gms:play-services-gcm:12.0.0'
compile 'com.android.support:multidex:1.0.3'
//compile 'com.facebook.android:facebook-android-sdk:4.12.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
//for slide image banner
compile 'com.nineoldandroids:library:2.4.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
//circular image view
//compile 'com.android.support:recyclerview-v7:26.1.0'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.12'
//gif image view
compile 'com.azoft.carousellayoutmanager:carousel:1.2.1'
/**For push Notification*/
compile 'com.microsoft.azure:notification-hubs-android-sdk:0.4@aar'
compile 'com.microsoft.azure:azure-notifications-handler:1.0.1@aar'
/**Range seek bar*/
compile 'com.appyvet:materialrangebar:1.4.1'
/**For google analytics*/
//compile 'com.google.firebase:firebase-core:10.2.4'
//compile 'com.google.android.gms:play-services-analytics:10.2.4'
/*Integration of hockey app*/
compile 'net.hockeyapp.android:HockeySDK:5.1.1'
//apply plugin: 'com.google.gms.google-services'
implementation 'com.android.support:recyclerview-v7:28.0.0'
//implementation 'com.google.code.gson:gson:2.8.5'

/* For Payment Stripe Libraries*/
implementation 'com.stripe:stripe-android:8.1.0'
implementation "com.stripe:stripe-java:7.10.0"
implementation 'com.github.extralam:Stripe-Android:1.0.2'

// glide
compile 'com.github.bumptech.glide:glide:3.7.0'



}

repositories {
maven {
url "http://dl.bintray.com/microsoftazuremobile/SDK"
}
}

** 我添加了 multidex
** 清理项目并重建
** 清除 gradle 缓存
** 删除.gradle 文件

但是还是报错。

最佳答案

只需将以下排除项添加到您的 build.gradle 文件中。

dependencies {
configurations {
all*.exclude group: 'androidx.core', module: 'core'
}
}

关于android - 重复的 zip 条目 [97.jar :androidx/versionedparcelable/CustomVersionedParcelable. 类],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54455195/

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