gpt4 book ai didi

java - app:transformClassesWithDexForDebug java.exe退出值1

转载 作者:行者123 更新时间:2023-12-03 03:30:16 26 4
gpt4 key购买 nike

在SO上似乎有很多类似的问题,我已经尝试了许多解决方案,但都没有奏效。

在Android Studio中,当我尝试在物理设备或模拟器上运行我的应用程序时,gradle构建失败,并出现以下错误:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_101\bin\java.exe'' finished with non-zero exit value 1



我尝试了以下方法:
  • 使缓存无效并重新启动
  • 清洁项目
  • 重建项目
  • 在24.0.1和23.0.3之间切换构建工具版本
  • 手动删除构建文件夹
  • 创建新文件夹并git克隆项目并从那里运行
  • 在dexOptions中将javaMaxHeapSize设置为“3g”
  • 在dexOptions
  • 中设置增量true和preDexLibraries false
  • 启用multiDex(即使我距离65k方法还差得很远,仍在项目的早期)。
  • 打开并运行另一个项目。这给了我同样的错误,直到我将构建工具从24.0.1切换到23.0.1,然后运行正常。当我在当前项目中执行相同的操作时,仍然会出现此错误。
  • 在某一时刻,我没有使用调试按钮来运行它,而是使用调试按钮来运行它,它将APK推送到了模拟器,但是随后为我的启动 Activity 给了ClassNotFoundException并崩溃了。我重命名/重构了类名,原来的错误又回来了。
  • 重新启动计算机

  • 我的想法不多了,所以如果您有任何想法,请告诉我!这是我的build.gradle:
    apply plugin: 'com.android.application'

    android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3" // https://developer.android.com/studio/releases/build-tools.html

    defaultConfig {
    applicationId "my.app.id"
    minSdkVersion 16
    targetSdkVersion 23
    versionCode 0
    versionName "0.0.146"
    }

    dexOptions {
    incremental = true;
    preDexLibraries = false
    javaMaxHeapSize "3g"
    }

    buildTypes {
    release {
    minifyEnabled false
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    }
    }

    dependencies {
    ext {
    supportLibVersion = '23.4.0' // https://developer.android.com/topic/libraries/support-library/revisions.html
    }

    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile "com.android.support:appcompat-v7:${supportLibVersion}"
    compile "com.android.support:design:${supportLibVersion}"
    compile "com.android.support:recyclerview-v7:${supportLibVersion}"
    }

    编辑:从Gradle控制台输出
    Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]

    Configuration on demand is an incubating feature.
    Incremental java compilation is an incubating feature.
    :app:preBuild UP-TO-DATE
    :app:preDebugBuild UP-TO-DATE
    :app:checkDebugManifest
    :app:preReleaseBuild UP-TO-DATE
    :app:prepareComAndroidSupportAnimatedVectorDrawable2340Library UP-TO-DATE
    :app:prepareComAndroidSupportAppcompatV72340Library UP-TO-DATE
    :app:prepareComAndroidSupportDesign2340Library UP-TO-DATE
    :app:prepareComAndroidSupportRecyclerviewV72340Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportV42340Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportVectorDrawable2340Library UP-TO-DATE
    :app:prepareDebugDependencies
    :app:compileDebugAidl UP-TO-DATE
    :app:compileDebugRenderscript UP-TO-DATE
    :app:generateDebugBuildConfig UP-TO-DATE
    :app:mergeDebugShaders UP-TO-DATE
    :app:compileDebugShaders UP-TO-DATE
    :app:generateDebugAssets UP-TO-DATE
    :app:mergeDebugAssets UP-TO-DATE
    :app:generateDebugResValues UP-TO-DATE
    :app:generateDebugResources UP-TO-DATE
    :app:mergeDebugResources UP-TO-DATE
    :app:processDebugManifest
    :app:processDebugResources
    :app:generateDebugSources
    :app:preDebugAndroidTestBuild UP-TO-DATE
    :app:prepareDebugAndroidTestDependencies
    :app:compileDebugAndroidTestAidl UP-TO-DATE
    :app:processDebugAndroidTestManifest UP-TO-DATE
    :app:compileDebugAndroidTestRenderscript UP-TO-DATE
    :app:generateDebugAndroidTestBuildConfig UP-TO-DATE
    :app:mergeDebugAndroidTestShaders UP-TO-DATE
    :app:compileDebugAndroidTestShaders UP-TO-DATE
    :app:generateDebugAndroidTestAssets UP-TO-DATE
    :app:mergeDebugAndroidTestAssets UP-TO-DATE
    :app:generateDebugAndroidTestResValues UP-TO-DATE
    :app:generateDebugAndroidTestResources UP-TO-DATE
    :app:mergeDebugAndroidTestResources UP-TO-DATE
    :app:processDebugAndroidTestResources
    :app:generateDebugAndroidTestSources
    :app:mockableAndroidJar UP-TO-DATE
    :app:preDebugUnitTestBuild UP-TO-DATE
    :app:prepareDebugUnitTestDependencies

    BUILD SUCCESSFUL

    Total time: 12.859 secs
    Executing tasks: [:app:assembleDebug]

    Configuration on demand is an incubating feature.
    Incremental java compilation is an incubating feature.
    :app:preBuild UP-TO-DATE
    :app:preDebugBuild UP-TO-DATE
    :app:checkDebugManifest
    :app:preReleaseBuild UP-TO-DATE
    :app:prepareComAndroidSupportAnimatedVectorDrawable2340Library UP-TO-DATE
    :app:prepareComAndroidSupportAppcompatV72340Library UP-TO-DATE
    :app:prepareComAndroidSupportDesign2340Library UP-TO-DATE
    :app:prepareComAndroidSupportRecyclerviewV72340Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportV42340Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportVectorDrawable2340Library UP-TO-DATE
    :app:prepareDebugDependencies
    :app:compileDebugAidl UP-TO-DATE
    :app:compileDebugRenderscript UP-TO-DATE
    :app:generateDebugBuildConfig UP-TO-DATE
    :app:mergeDebugShaders UP-TO-DATE
    :app:compileDebugShaders UP-TO-DATE
    :app:generateDebugAssets UP-TO-DATE
    :app:mergeDebugAssets UP-TO-DATE
    :app:generateDebugResValues UP-TO-DATE
    :app:generateDebugResources UP-TO-DATE
    :app:mergeDebugResources UP-TO-DATE
    :app:processDebugManifest
    :app:processDebugResources
    :app:generateDebugSources
    :app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
    :app:compileDebugJavaWithJavac UP-TO-DATE
    :app:compileDebugNdk UP-TO-DATE
    :app:compileDebugSources UP-TO-DATE
    :app:buildInfoDebugLoader
    :app:transformClassesWithExtractJarsForDebug UP-TO-DATE
    :app:transformClassesWithInstantRunVerifierForDebug UP-TO-DATE
    :app:transformClassesWithJavaResourcesVerifierForDebug UP-TO-DATE
    :app:mergeDebugJniLibFolders UP-TO-DATE
    :app:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
    :app:processDebugJavaRes UP-TO-DATE
    :app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
    :app:transformResourcesAndNative_libsWithJavaResourcesVerifierForDebug UP-TO-DATE
    :app:transformClassesWithInstantRunForDebug UP-TO-DATE
    :app:transformClasses_enhancedWithInstant+reloadDexForDebug UP-TO-DATE
    :app:incrementalDebugTasks
    :app:prePackageMarkerForDebug
    :app:fastDeployDebugExtractor UP-TO-DATE
    :app:generateDebugInstantRunAppInfo UP-TO-DATE
    :app:coldswapKickerDebug
    :app:transformClassesWithInstantRunSlicerForDebug UP-TO-DATE
    :app:transformClassesWithDexForDebug
    To run dex in process, the Gradle daemon needs a larger heap.
    It currently has approximately 989 MB.
    For faster builds, increase the maximum heap size for the Gradle daemon to more than 4096 MB.
    To do this set org.gradle.jvmargs=-Xmx4096M in the project gradle.properties.
    For more information see https://docs.gradle.org/current/userguide/build_environment.html
    :app:transformClassesWithDexForDebug FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':app:transformClassesWithDexForDebug'.
    > com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_101\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

    Total time: 8.85 secs

    编辑:其他Gradle输出--stacktrack和--info标志
    好的,这里是使用这些标志时提供的一些其他信息。
    堆栈跟踪:
    ...
    :app:transformClassesWithDexForDebug FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':app:transformClassesWithDexForDebug'.
    > com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_101\bin\java.exe'' finished with non-zero exit value 1

    * Try:
    Run with --info or --debug option to get more log output.

    * Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithDexForDebug'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
    at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
    at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
    at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:46)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:58)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:78)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:48)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
    at org.gradle.util.Swapper.swap(Swapper.java:38)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:66)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
    Caused by: java.lang.RuntimeException: com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_101\bin\java.exe'' finished with non-zero exit value 1
    at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:54)
    at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:57)
    at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:47)
    at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:173)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:244)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:231)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
    ... 70 more
    Caused by: com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_101\bin\java.exe'' finished with non-zero exit value 1
    at com.android.build.gradle.internal.transforms.DexTransform.transform(DexTransform.java:423)
    at com.android.build.gradle.internal.pipeline.TransformTask$3.call(TransformTask.java:178)
    at com.android.build.gradle.internal.pipeline.TransformTask$3.call(TransformTask.java:174)
    at com.android.builder.profile.ThreadRecorder$1.record(ThreadRecorder.java:55)
    ... 79 more
    Caused by: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_101\bin\java.exe'' finished with non-zero exit value 1
    at com.android.ide.common.internal.WaitableExecutor.waitForTasksWithQuickFail(WaitableExecutor.java:119)
    at com.android.build.gradle.internal.transforms.DexTransform.transform(DexTransform.java:364)
    ... 82 more
    Caused by: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_101\bin\java.exe'' finished with non-zero exit value 1
    at com.android.builder.core.AndroidBuilder.dexOutOfProcess(AndroidBuilder.java:1553)
    at com.android.builder.core.AndroidBuilder.runDexer(AndroidBuilder.java:1495)
    at com.android.builder.core.AndroidBuilder.preDexLibraryNoCache(AndroidBuilder.java:1766)
    at com.android.builder.internal.compiler.PreDexCache.preDexLibrary(PreDexCache.java:119)
    at com.android.builder.core.AndroidBuilder.preDexLibrary(AndroidBuilder.java:1721)
    at com.android.build.gradle.internal.transforms.DexTransform$PreDexTask.call(DexTransform.java:473)
    at com.android.build.gradle.internal.transforms.DexTransform$PreDexTask.call(DexTransform.java:427)
    Caused by: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_101\bin\java.exe'' finished with non-zero exit value 1
    at com.android.builder.core.AndroidBuilder.dexOutOfProcess(AndroidBuilder.java:1549)
    ... 6 more
    Caused by: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_101\bin\java.exe'' finished with non-zero exit value 1
    at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:43)
    at com.android.builder.core.AndroidBuilder$3.call(AndroidBuilder.java:1538)
    at com.android.builder.core.AndroidBuilder$3.call(AndroidBuilder.java:1531)
    Caused by: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_101\bin\java.exe'' finished with non-zero exit value 1
    at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:367)
    at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:41)
    ... 2 more


    BUILD FAILED

    info标志提供了原始gradle输出以及以下内容:
    Dexing out-of-process

    在最终失败之前。

    让我也从您共享的链接中尝试您的一些建议cricket_007。

    最佳答案

    如果您使用的是jdk 1.8,则应使用api 24,并在使用它之前确保已正确安装
    简而言之,v23适用于jdk 1.7,而v24适用于api 24,jdk 1.8

    关于java - app:transformClassesWithDexForDebug java.exe退出值1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38926941/

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