不会构建多维Android项目 - ProcessInfoBuilder $ JavaProcessInfoImpl.getExecutable抛出UnsupportedOperationException

时间:2017-01-01 18:37:40

标签: android-gradle dagger-2

我有一个相当大的,多维度的Android应用程序,我正在尝试从Dagger 1升级到Dagger 2.我已经做了所有代码更改,我认为需要进行支持升级,但是现在,当我构建应用程序时,我得到以下异常(在 transformClassesWithMultidexlistForXXX 任务期间):

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForMyFlavorAndDimensionDebug'.
> java.lang.UnsupportedOperationException (no error message)

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

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithMultidexlistForMyFlavorAndDimensionDebug'.
        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)
        ...(snip)...
Caused by: java.lang.UnsupportedOperationException
        at com.android.ide.common.process.ProcessInfoBuilder$JavaProcessInfoImpl.getExecutable(ProcessInfoBuilder.java:349)
        at com.android.build.gradle.internal.process.GradleProcessResult.buildProcessException(GradleProcessResult.java:74)
        at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:49)
        at com.android.builder.core.AndroidBuilder.createMainDexList(AndroidBuilder.java:1426)
        ...(snip)...
        ... 68 more


BUILD FAILED

Total time: 5 mins 5.179 secs
Stopped 0 compiler daemon(s).

深入sourceProcessBuilder.JavaProcessInfoImpl.getExecutable()只会引发UnsupportedOperationException

我正在使用Android Gradle插件的2.2.3版本。

还有其他人遇到过这个问题吗?我做错了什么让我走上这条道路?

任何想法或建议都将不胜感激!

*********************** 更新 **************** *******

我通过降级Dagger 2.8来解决这个问题 - > 2.7。

0 个答案:

没有答案