- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在使用 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/
今天,我将我的 Android Studio 更新到了 3.5。更新后,我在尝试运行该应用程序时发现以下警告。 The rule -keep public class * extends androi
我正在做一个 react native android 项目,但我被这个错误困住了 > Task :app:transformDexArchiveWithExternalLibsDexMergerFo
我在flutter项目中添加了geolocator程序包,每当我运行时,都会收到有关androidx兼容性和 任务':app:preDebugBuild'的执行失败。 Android dependen
我正在尝试添加这个 https://github.com/ArthurHub/Android-Image-Cropper但是当我添加它时我得到这个错误“错误:程序类型已经存在:androidx.ver
我遇到以下错误 --> 错误:程序类型已存在:androidx.versionedparcelable.CustomVersionedParcelable 当我点击 Build errors 时,它会
我在使用 android studio 3.0.1 时遇到了这个问题。 Error:Execution failed for task ':app:transformClassesWithMultid
我是一名优秀的程序员,十分优秀!