我有一个在模拟器上工作正常但在手机启动时崩溃的应用程序。
我是说我只是将SDK文件夹的内容解压缩到libs中,而不是在libs中只包含一个parse文件夹中的所有内容?
Gradle文件
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
答案 0 :(得分:4)
你的一个库使用不同的bolt库/类,所以有一些重复。请在终端中使用./gradlew yourModuleName:dependencies
来检查依赖关系树