在本文中,我们将为您详细介绍android–错误JSON.simple:java.util.zip.ZipException:重复条目:org/hamcrest/BaseDescription.cla
在本文中,我们将为您详细介绍android – 错误JSON.simple:java.util.zip.ZipException:重复条目:org / hamcrest / BaseDescription.class的相关知识,此外,我们还会提供一些关于Android Gradle DexException:多个dex文件定义Lorg / hamcrest / Description、Android Parse.com-java.util.zip.ZipException:重复输入:bolts / AggregateException.class、Android Studio java.util.zip.ZipException:重复条目、android – Build在debug中运行,在release中失败 – ZipException重复条目的有用信息。
本文目录一览:- android – 错误JSON.simple:java.util.zip.ZipException:重复条目:org / hamcrest / BaseDescription.class
- Android Gradle DexException:多个dex文件定义Lorg / hamcrest / Description
- Android Parse.com-java.util.zip.ZipException:重复输入:bolts / AggregateException.class
- Android Studio java.util.zip.ZipException:重复条目
- android – Build在debug中运行,在release中失败 – ZipException重复条目
android – 错误JSON.simple:java.util.zip.ZipException:重复条目:org / hamcrest / BaseDescription.class
在添加JSON.simple并启用MultiDex并获得以下错误后,我在android studio中遇到问题:
Error:Execution Failed for task ‘:app:packageAllDebugClassesForMultiDex’.
java.util.zip.ZipException: duplicate entry: org/hamcrest/BaseDescription.class
这是我的build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsversion "23.0.1"
defaultConfig {
applicationId "com.MildlyGoodApps.EffortlessDescriptions"
minSdkVersion 10
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile filetree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.googlecode.json-simple:json-simple:1.1.1'
compile 'com.android.support:multidex:1.0.0'
}
谢谢.
固定:
更改了编译’com.googlecode.json-simple:json-simple:1.1.1’编译(‘com.googlecode.json-simple:json-simple:1.1.1′){exclude group:’org.hamcrest’,模块:’hamcrest-core’}.
谢谢Kane O’Riley!
解决方法:
更改你的json-simple导入以排除hamcrest依赖,如下所示:
compile('com.googlecode.json-simple:json-simple:1.1.1') {
exclude group: 'org.hamcrest', module: 'hamcrest-core'
}
这将防止包含多个依赖项副本.
Android Gradle DexException:多个dex文件定义Lorg / hamcrest / Description
com.android.dex.DexException:多个dex文件定义Lorg / hamcrest / Description
尝试通过Android Studio或我的应用程序上的Gradle命令行进行调试构建/测试时发生.
发布版本(没有测试)工作正常,但只要包含测试(hamcrest是测试库),构建就会因上述错误而失败.
我已经检查了我的模块依赖项,并且没有重复的要求,gradle -q依赖项证实了这一点.
项目settings.gradle
include ':[library module]'
include ':[main module]'
项目build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
classpath 'org.robolectric.gradle:gradle-android-test-plugin:0.9.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
[library module] build.gradle
apply plugin: 'android-library'
android {
compileSdkVersion 19
buildToolsversion "19.0.0"
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
}
packagingOptions {
exclude 'meta-inf/LICENSE.txt'
exclude 'meta-inf/NOTICE.txt'
}
}
dependencies {
compile 'com.google.zxing:core:3.0.+'
compile 'com.bugsnag:bugsnag-android:2.1.1+'
}
[主模块] build.gradle
apply plugin: 'android'
android {
signingConfigs {
release {
[...]
}
}
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
res.srcDirs = ['src/main/res']
}
androidTest {
setRoot('src/test')
}
instrumentTest {
}
}
compileSdkVersion 19
buildToolsversion '19.0.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
testPackageName "[main.packageName].tests"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
packagingOptions {
exclude 'meta-inf/LICENSE.txt'
exclude 'meta-inf/NOTICE.txt'
}
}
apply plugin: 'android-test'
androidTest {
// configure the set of classes for JUnit tests
include '**/*Test.class'
// configure max heap size of the test JVM
maxHeapSize = "2048m"
}
repositories {
maven { url 'https://repo.commonsware.com.s3.amazonaws.com' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
dependencies {
androidTestCompile 'junit:junit:4.10'
androidTestCompile 'org.robolectric:robolectric:2.3-SNAPSHOT'
androidTestCompile 'com.squareup:fest-android:1.0.+'
compile project(':[library module]')
compile 'com.github.gabrielemariotti.changeloglib:library:1.4.+'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:appcompat-v7:+'
compile ('de.keyboardsurfer.android.widget:crouton:1.8.+') {
exclude group: 'com.google.android', module: 'support-v4'
}
compile files('libs/CWAC-LoaderEx.jar')
compile 'com.squareup.okhttp:okhttp:1.5.+'
compile 'com.octo.android.robospice:robospice:1.4.11'
compile 'com.octo.android.robospice:robospice-cache:1.4.11'
compile 'com.octo.android.robospice:robospice-retrofit:1.4.11'
compile 'com.commonsware.cwac:security:0.1.+'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
}
解决方法:
Robolectric 2.3依赖于JUnit 4.8.1(版本显式).您正在导入JUnit 4.10(版本显式). Hamcrest可能只是dex窒息的许多重复项中的第一个 – 尝试将JUnit需求版本更改为4.8(或者从Robolectric依赖项中排除JUnit).
Android Parse.com-java.util.zip.ZipException:重复输入:bolts / AggregateException.class
我有一个可以在模拟器上正常运行的应用程序,但在手机启动时崩溃.
我是说我只是将SDK文件夹的内容提取到lib中,而不是在libs中只有一个parse文件夹包含所有内容吗?
摇篮文件
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsversion "21.1.2"
defaultConfig {
applicationId "com.aaa.bbb"
minSdkVersion 16
targetSdkVersion 19
versionCode 30
versionName "30"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
productFlavors {
}
defaultConfig {
multiDexEnabled true
} }
dependencies {
compile filetree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile filetree(dir: 'libs', include: ['*.jar'])
compile 'com.mcxiaoke.volley:library:1.+'
compile 'com.nhaarman.listviewanimations:lib-core:3.1.0@aar'
compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0@aar'
compile 'com.nhaarman.listviewanimations:lib-core-slh:3.1.0@aar'
compile 'com.nononsenseapps:filepicker:+'
compile 'io.socket:socket.io-client:0.2.1'
compile 'com.google.android.gms:play-services:7.8.0'
compile 'com.android.support:appcompat-v7:19.+'
compile 'com.google.android.gms:play-services-analytics:7.8.0'
compile 'com.android.support:design:23.+'
compile 'com.android.support:support-v4:23.+'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
}
日志记录
:app:packageAllDebugClassesForMultiDex Failed
Error:Execution Failed for task ':app:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: bolts/AggregateException.class
解决方法:
您的一个库正在使用不同的螺栓库/类,因此有一些重复.请在终端中使用./gradlew yourModuleName:dependencies检查依赖关系树
Android Studio java.util.zip.ZipException:重复条目
这是我的build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsversion "23.0.2"
defaultConfig {
applicationId "com.arefin.lasttrykinvay"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
}
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compile filetree(dir: 'libs',include: ['*.jar'])
compile(name:'kinvey-android-2.10.5',ext:'aar')
compile 'com.android.support:appcompat-v7:23.1.1'
compile google-http-client-1.19.0.jar
compile google-http-client-android-1.19.0.jar
compile google-http-client-gson-1.19.0.jar
compile google-http-client-jackson2-1.19.0.jar
compile gson-2.1.jar guava-18.0.jar
compile jackson-core-2.1.3.jar
compile java-api-core-2.10.1.jar
compile java-api-core-2.10.5.jar
compile kinvey-android-2.10.5.aar
testCompile 'junit:junit:4.12'
}
这是错误
Error:Execution Failed for task ':app:transformClassesWithJarMergingForRelease'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/kinvey/java/AbstractClient$Builder$Option.class
当我删除
compile 'com.android.support:appcompat-v7:23.1.1'
以上错误修复但其他功能无法正常工作.喜欢的价值观/风格无法找到
Theme.AppCompat.Light.DarkActionBar
我怎么能重复输入错误?
虽然OP没有写出来,但是如果你看一下原始问题的评论,你会发现它们在libs目录中有很多.jar库文件,它们都包含在以下行中:
dependencies {
compile filetree(dir: 'libs',include: ['*.jar'])
//...
}
在他们的一条评论中,他们在libs目录中列出了以下文件:
> google-http-client-1.19.0.jar
> google-http-client-android-1.19.0.jar
> google-http-client-gson-1.19.0.jar
> google-http-client-jackson2-1.19.0.jar
> gson-2.1.jar
> guava-18.0.jar
> jackson-core-2.1.3.jar
> java-api-core-2.10.1.jar重复!
> java-api-core-2.10.5.jar重复!
> kinvey-android-2.10.5.aar
您可以清楚地看到java-api-core包含两次,一次用于2.10.1版本,一次用于2.10.5版本.构建系统不够智能,只能将其中一个引入,而且不应该这样.用户应该告诉构建系统要包含哪些库以及要包含哪些库.
通过从libs目录中删除java-api-core-2.10.1.jar文件,应该解决错误.
这可能不是您遇到的确切问题,但可能是类似的结果.
为了帮助避免这些情况,这里有几个最佳实践:
1.不要使用编译filetree ….
而不是隐藏您所包含的所有.jar文件,而是显式地声明您在依赖项{}下编译的文件.这样可以更容易地查看何时出现重复,冲突和其他类似问题.
2.尽可能使用Maven而不是.jar文件.
虽然它不会抓住这个,但是通过使用Maven并在不同的版本中将相同的依赖项放两次,它应该只解决其中一个依赖项(我认为)并避免像你所看到的那样的神秘错误.
android – Build在debug中运行,在release中失败 – ZipException重复条目
Error:Execution Failed for task ':transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/hardware/display/displayManagerCompat.class
当我在调试模式下运行时,应用程序构建没有问题,但是,当我尝试构建APK时,我得到上面的错误.
有没有办法可以追踪重复的包裹?我运行了以下内容:
./gradlew -q dependencies :dependencies --configuration compile ------------------------------------------------------------ Root project ------------------------------------------------------------ compile - Classpath for compiling the main sources. +--- com.android.support:multidex:1.0.1 +--- com.android.support:appcompat-v7:25.0.0 | +--- com.android.support:support-vector-drawable:25.0.0 | | \--- com.android.support:support-compat:25.0.0 | | \--- com.android.support:support-annotations:25.0.0 | \--- com.android.support:animated-vector-drawable:25.0.0 | \--- com.android.support:support-vector-drawable:25.0.0 (*) +--- project :deps:android-map-utils:library | \--- project :deps:google-maps-m4b \--- project :deps:google-play-services (*) - dependencies omitted (listed prevIoUsly)
这是我的build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.2' } } apply plugin: 'com.android.application' dependencies { compile 'com.android.support:multidex:1.0.1' compile 'com.android.support:appcompat-v7:25.0.0' compile filetree(include: '*.jar',dir: 'libs') compile filetree(include: '*.jar',dir: 'lib') compile project(':deps:google-maps-m4b') compile project(':deps:android-map-utils:library') compile project(':deps:google-play-services') } android { compileSdkVersion 24 buildToolsversion '25.0.0' packagingOptions { exclude 'meta-inf/DEPENDENCIES.txt' exclude 'meta-inf/DEPENDENCIES' exclude 'meta-inf/dependencies.txt' exclude 'meta-inf/LICENSE.txt' exclude 'meta-inf/LICENSE' exclude 'meta-inf/license.txt' exclude 'meta-inf/LGPL2.1' exclude 'meta-inf/NOTICE.txt' exclude 'meta-inf/NOTICE' exclude 'meta-inf/notice.txt' } defaultConfig { // Already hit dex limit multiDexEnabled true dexOptions { javaMaxHeapSize "4g" } } lintOptions { abortOnError false } sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] jniLibs.srcDirs = ['libs'] } // Move the tests to tests/java,tests/res,etc... instrumentTest.setRoot('tests') // Move the build types to build-types/<type> // For instance,build-types/debug/java,build-types/debug/AndroidManifest.xml,... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similar customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } allprojects { repositories { jcenter() } }
libs中的文件:armeabi / libcryptowrapper.so
lib中的文件:
ClientCertUtil.jar apache-mime4j-0.6.jar commons-codec-1.6.jar commons-io-2.4.jar commons-logging-1.1.3.jar gcm.jar httpclient-4.3.4.jar httpclientandroidlib-1.2.1.jar httpcore-4.3.jar httpmime-4.3.1.jar javarosa.jar joda-time-2.0.jar kxml2-2.3.0.jar mgrs.jar opencsv-2.3.jar regexp-me.jar zip4j_1.3.2.jar
将exclude module:’support-v4’添加到appcompat-v7时,构建失败仍然显示调试日志,无法加载索引超出范围的主活动,长度:0,索引:3:
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class Error:(net.lingala.zip4j.unzip.Unzip$1) that doesn't come with an Error:associated EnclosingMethod attribute. This class was probably produced by a Error:compiler that did not target the modern .class file format. The recommended Error:solution is to recompile the class from source,using an up-to-date compiler Error:and without specifying any "-target" type options. The consequence of ignoring Error:this warning is that reflective operations on this class will incorrectly Error:indicate that it is *not* an inner class.
运行
./gradlew -q projects ------------------------------------------------------------ Root project ------------------------------------------------------------ Root project 'opendatakit-collect' \--- Project ':deps' +--- Project ':deps:android-map-utils' | \--- Project ':deps:android-map-utils:library' +--- Project ':deps:google-maps-m4b' \--- Project ':deps:google-play-services'
运行./gradlew:依赖项,因为我似乎没有项目名称:
Incremental java compilation is an incubating feature. :dependencies ------------------------------------------------------------ Root project ------------------------------------------------------------ _debugAndroidTestAnnotationProcessor - ## Internal use,do not manually configure ## No dependencies _debugAndroidTestApk - ## Internal use,do not manually configure ## \--- com.android.support:multidex-instrumentation:1.0.1 \--- com.android.support:multidex:1.0.1 _debugAndroidTestCompile - ## Internal use,do not manually configure ## \--- com.android.support:multidex-instrumentation:1.0.1 \--- com.android.support:multidex:1.0.1 _debugAnnotationProcessor - ## Internal use,do not manually configure ## No dependencies _debugApk - ## Internal use,do not manually configure ## +--- com.android.support:multidex:1.0.1 +--- com.android.support:appcompat-v7:25.0.0 | +--- com.android.support:support-vector-drawable:25.0.0 | | \--- com.android.support:support-compat:25.0.0 | | \--- com.android.support:support-annotations:25.0.0 | \--- com.android.support:animated-vector-drawable:25.0.0 | \--- com.android.support:support-vector-drawable:25.0.0 (*) +--- project :deps:google-maps-m4b +--- project :deps:android-map-utils:library | \--- project :deps:google-maps-m4b \--- project :deps:google-play-services _debugCompile - ## Internal use,do not manually configure ## +--- com.android.support:multidex:1.0.1 +--- com.android.support:appcompat-v7:25.0.0 | +--- com.android.support:support-vector-drawable:25.0.0 | | \--- com.android.support:support-compat:25.0.0 | | \--- com.android.support:support-annotations:25.0.0 | \--- com.android.support:animated-vector-drawable:25.0.0 | \--- com.android.support:support-vector-drawable:25.0.0 (*) +--- project :deps:google-maps-m4b +--- project :deps:android-map-utils:library | \--- project :deps:google-maps-m4b \--- project :deps:google-play-services _debugUnitTestAnnotationProcessor - ## Internal use,do not manually configure ## No dependencies _debugUnitTestApk - ## Internal use,do not manually configure ## No dependencies _debugUnitTestCompile - ## Internal use,do not manually configure ## No dependencies _releaseAnnotationProcessor - ## Internal use,do not manually configure ## No dependencies _releaseApk - ## Internal use,do not manually configure ## +--- com.android.support:multidex:1.0.1 +--- com.android.support:appcompat-v7:25.0.0 | +--- com.android.support:support-vector-drawable:25.0.0 | | \--- com.android.support:support-compat:25.0.0 | | \--- com.android.support:support-annotations:25.0.0 | \--- com.android.support:animated-vector-drawable:25.0.0 | \--- com.android.support:support-vector-drawable:25.0.0 (*) +--- project :deps:google-maps-m4b +--- project :deps:android-map-utils:library | \--- project :deps:google-maps-m4b \--- project :deps:google-play-services _releaseCompile - ## Internal use,do not manually configure ## +--- com.android.support:multidex:1.0.1 +--- com.android.support:appcompat-v7:25.0.0 | +--- com.android.support:support-vector-drawable:25.0.0 | | \--- com.android.support:support-compat:25.0.0 | | \--- com.android.support:support-annotations:25.0.0 | \--- com.android.support:animated-vector-drawable:25.0.0 | \--- com.android.support:support-vector-drawable:25.0.0 (*) +--- project :deps:google-maps-m4b +--- project :deps:android-map-utils:library | \--- project :deps:google-maps-m4b \--- project :deps:google-play-services _releaseUnitTestAnnotationProcessor - ## Internal use,do not manually configure ## No dependencies _releaseUnitTestApk - ## Internal use,do not manually configure ## No dependencies _releaseUnitTestCompile - ## Internal use,do not manually configure ## No dependencies androidJacocoAgent - The Jacoco agent to use to get coverage data. \--- org.jacoco:org.jacoco.agent:0.7.5.201505241946 androidJacocoAnt - The Jacoco ant tasks to use to get execute Gradle tasks. \--- org.jacoco:org.jacoco.ant:0.7.5.201505241946 +--- org.jacoco:org.jacoco.core:0.7.5.201505241946 | \--- org.ow2.asm:asm-debug-all:5.0.1 +--- org.jacoco:org.jacoco.report:0.7.5.201505241946 | +--- org.jacoco:org.jacoco.core:0.7.5.201505241946 (*) | \--- org.ow2.asm:asm-debug-all:5.0.1 \--- org.jacoco:org.jacoco.agent:0.7.5.201505241946 androidTestAnnotationProcessor - Classpath for the annotation processor for 'androidTest'. No dependencies androidTestApk - Classpath packaged with the compiled 'androidTest' classes. No dependencies androidTestCompile - Classpath for compiling the androidTest sources. No dependencies androidTestProvided - Classpath for only compiling the androidTest sources. No dependencies androidTestWearapp - Link to a wear app to embed for object 'androidTest'. No dependencies annotationProcessor - Classpath for the annotation processor for 'main'. No dependencies apk - Classpath packaged with the compiled 'main' classes. No dependencies archives - Configuration for archive artifacts. No dependencies compile - Classpath for compiling the main sources. +--- com.android.support:multidex:1.0.1 +--- com.android.support:appcompat-v7:25.0.0 | +--- com.android.support:support-vector-drawable:25.0.0 | | \--- com.android.support:support-compat:25.0.0 | | \--- com.android.support:support-annotations:25.0.0 | \--- com.android.support:animated-vector-drawable:25.0.0 | \--- com.android.support:support-vector-drawable:25.0.0 (*) +--- project :deps:google-maps-m4b +--- project :deps:android-map-utils:library | \--- project :deps:google-maps-m4b \--- project :deps:google-play-services debugAnnotationProcessor - Classpath for the annotation processor for 'debug'. No dependencies debugApk - Classpath packaged with the compiled 'debug' classes. No dependencies debugCompile - Classpath for compiling the debug sources. No dependencies debugProvided - Classpath for only compiling the debug sources. No dependencies debugWearapp - Link to a wear app to embed for object 'debug'. No dependencies default - Configuration for default artifacts. No dependencies default-mapping - Configuration for default mapping artifacts. No dependencies default-Metadata - Metadata for the produced APKs. No dependencies instrumentTestAnnotationProcessor - Classpath for the annotation processor for 'instrumentTest'. No dependencies instrumentTestApk - Classpath packaged with the compiled 'instrumentTest' classes. No dependencies instrumentTestCompile - Classpath for compiling the instrumentTest sources. No dependencies instrumentTestProvided - Classpath for only compiling the instrumentTest sources. No dependencies instrumentTestWearapp - Link to a wear app to embed for object 'instrumentTest'. No dependencies provided - Classpath for only compiling the main sources. No dependencies releaseAnnotationProcessor - Classpath for the annotation processor for 'release'. No dependencies releaseApk - Classpath packaged with the compiled 'release' classes. No dependencies releaseCompile - Classpath for compiling the release sources. No dependencies releaseProvided - Classpath for only compiling the release sources. No dependencies releaseWearapp - Link to a wear app to embed for object 'release'. No dependencies testAnnotationProcessor - Classpath for the annotation processor for 'test'. No dependencies testApk - Classpath packaged with the compiled 'test' classes. No dependencies testCompile - Classpath for compiling the test sources. No dependencies testDebugAnnotationProcessor - Classpath for the annotation processor for 'testDebug'. No dependencies testDebugApk - Classpath packaged with the compiled 'testDebug' classes. No dependencies testDebugCompile - Classpath for compiling the testDebug sources. No dependencies testDebugProvided - Classpath for only compiling the testDebug sources. No dependencies testDebugWearapp - Link to a wear app to embed for object 'testDebug'. No dependencies testProvided - Classpath for only compiling the test sources. No dependencies testReleaseAnnotationProcessor - Classpath for the annotation processor for 'testRelease'. No dependencies testReleaseApk - Classpath packaged with the compiled 'testRelease' classes. No dependencies testReleaseCompile - Classpath for compiling the testRelease sources. No dependencies testReleaseProvided - Classpath for only compiling the testRelease sources. No dependencies testReleaseWearapp - Link to a wear app to embed for object 'testRelease'. No dependencies testWearapp - Link to a wear app to embed for object 'test'. No dependencies wearapp - Link to a wear app to embed for object 'main'. No dependencies BUILD SUCCESSFUL Total time: 13.053 secs This build Could be faster,please consider using the Gradle Daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
解决方法
所以,这里有一些尝试.由于您在添加com.android.support:appcompat-v7:25.0.0 lib后出现错误,请执行以下操作:
compile (compile 'com.android.support:appcompat-v7:25.0.0') { exclude module: 'support-v4' }
查看它是否有效或错误是否发生变化
编辑:
您运行了以下命令:./ gradlew -q dependencies:dependencies –configuration compile
您可以在Android Studio终端中运行此命令,并在您的问题中发布debugApk和releaseApk依赖项.
命令(如果模块名称不同,则将应用程序更改为模块名称):
./gradlew app:dependencies
今天关于android – 错误JSON.simple:java.util.zip.ZipException:重复条目:org / hamcrest / BaseDescription.class的分享就到这里,希望大家有所收获,若想了解更多关于Android Gradle DexException:多个dex文件定义Lorg / hamcrest / Description、Android Parse.com-java.util.zip.ZipException:重复输入:bolts / AggregateException.class、Android Studio java.util.zip.ZipException:重复条目、android – Build在debug中运行,在release中失败 – ZipException重复条目等相关知识,可以在本站进行查询。
本文标签: