【发布时间】:2018-01-05 06:42:45
【问题描述】:
当我尝试构建应用程序时,我收到错误
错误:任务 ':app:transformDexArchiveWithExternalLibsDexMergerForDebug' 执行失败。 com.android.builder.dexing.DexArchiveMergerException: java.util.zip.ZipException: zip 文件为空
我去清除了 JDK。我再次重新安装了它,但仍然出现错误。有人对此有任何想法吗? 提前致谢
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.vicky.sample"
minSdkVersion 21
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 {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
【问题讨论】:
-
在这里添加你的 build.gradle 。
-
好的,请稍等,我会添加
-
Unable to merge dex的可能重复
-
不要只说是重复的仔细看问题
-
我已经尝试了那些不起作用的解决方案,我还没有在我的项目中包含 GMS 服务
标签: android gradle android-gradle-plugin zip