我在Buildbox上创建了一个游戏,导出项目后无法在Android Studio上启动游戏。我的问题是无法运行应用程序或生成apk文件。请有人帮帮我。
错误为:"Error:执行任务':app:transformClassesWithMultidexlistForDebug'失败。java.io.IOException:无法写入[C:\Users\youne\Desktop\android2\app\build\intermediates\multi-dex\debug\componentClasses.jar](无法读取[C:\Users\youne.gradle\caches\transforms- 1 \files-1.1\support-core-ui-25.2.0.aar\9adfc8649fc899fbc5e371e8bc1c399a\jars\classes.jar(;;;;;; ** .class)](重复的zip条目[classes.jar:android/support/v4/view/ViewPager $ 2.class]))。"
我正在使用Android Studio 3.0,Java版本为Java(TM) SE Runtime Environment(版本1.8.0_73-b02),Gradle版本为com.android.tools.build:gradle:4.1,并且已启用Multidex。在我的app build.gradle文件中:
错误为:"Error:执行任务':app:transformClassesWithMultidexlistForDebug'失败。java.io.IOException:无法写入[C:\Users\youne\Desktop\android2\app\build\intermediates\multi-dex\debug\componentClasses.jar](无法读取[C:\Users\youne.gradle\caches\transforms- 1 \files-1.1\support-core-ui-25.2.0.aar\9adfc8649fc899fbc5e371e8bc1c399a\jars\classes.jar(;;;;;; ** .class)](重复的zip条目[classes.jar:android/support/v4/view/ViewPager $ 2.class]))。"
我正在使用Android Studio 3.0,Java版本为Java(TM) SE Runtime Environment(版本1.8.0_73-b02),Gradle版本为com.android.tools.build:gradle:4.1,并且已启用Multidex。在我的app build.gradle文件中:
android {
compileSdkVersion 27
buildToolsVersion '27.0.1'
defaultConfig {
applicationId "com.drh.bird"
minSdkVersion 14
targetSdkVersion 23
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
compileOptions.encoding = 'ISO-8859-1'
multiDexEnabled = true
ndk {
moduleName "player_shared"
}
}
android {
useLibrary 'org.apache.http.legacy'
}
sourceSets {
main {
jni.srcDirs = []
}
}
buildTypes {}
android {
defaultConfig {
multiDexEnabled true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services:+'
compile files('libs/dagger-1.2.2.jar')
compile files('libs/javax.inject-1.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/support-v4-19.0.1.jar')
}