2
我花了過去3個小時查找類似的問題,我覺得我嘗試了所有事情,但都沒有成功。我試圖通過模擬器運行應用程序,但它一直返回'transformClassesWithMultidexlistForDebug'
錯誤。該程序構建時沒有錯誤,只是當我通過模擬器運行它時,它會導致我出現問題。下面是我的Gradle應用程序,以及錯誤信息:當我嘗試在模擬器上運行時,Android Studio返回Transform Exception錯誤
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "com.moa.gsrental.rentalinventory"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:+'
compile 'com.android.support:multidex:1.0.0'
}
錯誤消息:
Preparing output jar [C:\Users\Omar\AndroidStudioProjects\Rentalinventory\app\build\intermediates\multi-dex\debug\componentClasses.jar]
Copying resources from program jar [C:\Users\Omar\AndroidStudioProjects\Rentalinventory\app\build\intermediates\transforms\jarMerging\debug\jars\1\1f\combined.jar]
:app:transformClassesWithMultidexlistForDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
任何幫助,將不勝感激!