android项目在模拟器上正常运行,但在任何真实设备上都没有。 build.gradle是否有一些错误试图通过使用
来解决它android {
...
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
}
}
但也没有发生任何事情multiDexEnabled true
,但得到同样的错误
这是我的build.gradle
文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.theakshaynaik.pocketambulance"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.firebaseui:firebase-ui:0.5.1'
compile 'com.google.android.gms:play-services:9.6.1'
testCompile 'junit:junit:4.12'
compile files('libs/httpclient-4.0.3.jar')
compile 'com.android.support:multidex:1.0.0'
}
apply plugin: 'com.google.gms.google-services'
我得到的错误是
错误:任务':app:transformClassesWithJarMergingForDebug'执行失败。 com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:android / support / v4 / os / ParcelableCompat.class
它包含错误ParcelableCompat.class,甚至我已经寻找解决方案但无法修复它。