在Android Studio中构建成功,但使用'gradlew build'构建失败并出现NullPointerException

时间:2018-06-14 05:08:03

标签: android android-gradle

我尝试了gradlew buildgradlew assembleDebug但他们都失败了。这很奇怪,因为如果我单击Android Studio中的构建菜单,构建会成功。可能是什么原因?我能想到的唯一区别是Android Studio可能正在使用OpenJDK而我的Java Home已设置为Oracle JDK 10.1。它有所作为吗?

短日志。

org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
   at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:94)
   at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:89)
    ....
   at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
 Caused by: java.lang.NullPointerException
   at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:782)
   at com.google.common.base.Splitter.split(Splitter.java:376)
   at com.android.utils.PathUtils.getClassPathItems(PathUtils.java:84)
   at com.android.build.gradle.internal.transforms.FixStackFramesTransform.<init>(FixStackFramesTransform.java:151)
   ....

完整日志。

12:49:43.609 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
12:49:43.609 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:49:43.609 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
12:49:43.609 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] A problem occurred configuring project ':app'.
12:49:43.609 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > java.lang.NullPointerException (no error message)
12:49:43.609 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:49:43.609 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
12:49:43.609 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]  Run with --scan to get full insights.
12:49:43.609 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:49:43.609 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Exception is:
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProje
ctEvaluator.java:94)
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEv
aluator.java:89)
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.
java:70)
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.configuration.project.LifecycleProjectEvaluator.access$100(LifecycleProjectEvaluator.j
ava:34)
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.configuration.project.LifecycleProjectEvaluator$ConfigureProject.run(LifecycleProjectE
valuator.java:110)
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(D
efaultBuildOperationExecutor.java:336)
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(D
efaultBuildOperationExecutor.java:328)
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.
java:199)
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java
:110)
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.jav
a:50)
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:666)
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:135)
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35)
12:49:43.610 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:62
)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuild.run(DefaultGradleLauncher.java:249
)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(D
efaultBuildOperationExecutor.java:336)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(D
efaultBuildOperationExecutor.java:328)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.
java:199)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java
:110)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher.configureBuild(DefaultGradleLauncher.java:167)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:126)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:109)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:78)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:75)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:100)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:75)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:2
8)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.
java:32)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$1.run(RunAsBuildOperationBuildActio
nRunner.java:43)
12:49:43.611 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(D
efaultBuildOperationExecutor.java:336)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(D
efaultBuildOperationExecutor.java:328)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.
java:199)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java
:110)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionR
unner.java:40)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRun
ner.java:51)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:4
7)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:3
0)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecu
ter.java:39)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecu
ter.java:25)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionE
xecuter.java:80)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionE
xecuter.java:53)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildA
ctionExecuter.java:57)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildA
ctionExecuter.java:32)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildAct
ionExecuter.java:36)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildAct
ionExecuter.java:25)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(Parallel
ismConfigurationBuildActionExecuter.java:43)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(Parallel
ismConfigurationBuildActionExecuter.java:29)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValid
atingActionExecuter.java:69)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValid
atingActionExecuter.java:30)
12:49:43.612 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailure
ReportingActionExecuter.java:59)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailure
ReportingActionExecuter.java:44)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecute
r.java:45)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecute
r.java:30)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:
122)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:3
7)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:
122)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java
:26)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:
122)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleU
sedDaemon.java:34)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:
122)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
12:49:43.613 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.util.Swapper.swap(Swapper.java:38)
12:49:43.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
12:49:43.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:
122)
12:49:43.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
12:49:43.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:
122)
12:49:43.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)
12:49:43.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
12:49:43.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:
122)
12:49:43.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironmen
t.java:82)
12:49:43.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
12:49:43.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:
122)
12:49:43.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithB
usy.java:50)
12:49:43.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295)
12:49:43.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.jav
a:63)
12:49:43.630 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
12:49:43.630 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java
:55)
12:49:43.630 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: java.lang.NullPointerException
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:782)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.google.common.base.Splitter.split(Splitter.java:376)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.utils.PathUtils.getClassPathItems(PathUtils.java:84)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.transforms.FixStackFramesTransform.<init>(FixStackFramesTransfo
rm.java:151)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.TaskManager.maybeCreateDesugarTask(TaskManager.java:2425)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.TaskManager.createPostCompilationTasks(TaskManager.java:2248)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.ApplicationTaskManager.addCompileTask(ApplicationTaskManager.ja
va:295)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.ApplicationTaskManager.lambda$createTasksForVariantScope$12(App
licationTaskManager.java:229)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.ApplicationTaskManager.createTasksForVariantScope(ApplicationTa
skManager.java:225)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.VariantManager.createTasksForVariantData(VariantManager.java:53
0)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.VariantManager.lambda$createAndroidTasks$1(VariantManager.java:
352)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.internal.VariantManager.createAndroidTasks(VariantManager.java:348)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.BasePlugin.lambda$createAndroidTasks$6(BasePlugin.java:751)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:746)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.BasePlugin.lambda$null$4(BasePlugin.java:652)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.android.build.gradle.BasePlugin.lambda$createTasks$5(BasePlugin.java:648)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.ja
va:91)
12:49:43.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.ja
va:80)
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230
)
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149
)
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324
)
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234
)
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140)
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispat
chAdapter.java:93)
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.sun.proxy.$Proxy27.afterEvaluate(Unknown Source)
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEv
aluator.java:76)
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   ... 81 more
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
12:49:43.632 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 1m 24s

1 个答案:

答案 0 :(得分:1)

是的,这很重要。 Android Studios JDK基于OpenJDK版本8。

您可以使用answer here

或者您可以在david.schreiber的链接中使用该答案下方的评论