gpt4 book ai didi

java - 当我尝试在模拟器上运行时,Android Studio 返回 Transform Exception 错误

转载 作者:行者123 更新时间:2023-12-02 01:13:47 25 4
gpt4 key购买 nike

我花了过去 3 个小时查找类似的问题,我觉得我已经尝试了一切,但没有成功。我尝试通过模拟器运行应用程序,但它不断返回 'transformClassesWithMultidexlistForDebug' 错误。该程序构建时没有错误,只是当我通过模拟器运行它时,它给我带来了问题。以下是我的应用程序 gradle 以及错误消息:

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

如有任何帮助,我们将不胜感激!

最佳答案

好的,我已经解决了这个问题,但我不知道如何解决。我基本上只是打开了另一个 android studio 项目的示例代码并模仿了 build.gradle。感谢所有看我问题的人!

关于java - 当我尝试在模拟器上运行时,Android Studio 返回 Transform Exception 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38208776/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com