如何修复此错误:mergeDebug资源

时间:2019-06-25 19:57:54

标签: java android build.gradle

我刚刚安装了Android Studio 5.1.1版,并且正在尝试编译和运行一个简单的应用程序。当我在真实设备上运行它时,显示错误:

  

MergeDebugResources执行TaskAction

我不知道如何解决

堆栈跟踪:

> java.util.concurrent.ExecutionException:
> com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2
> aapt2-3.4.1-5326820-windows Daemon #0: Daemon startup failed This
> should not happen under normal circumstances, please file an issue if
> it does.  at
> java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006)     at
> com.android.ide.common.workers.ExecutorServiceAdapter.await(ExecutorServiceAdapter.kt:56)
>   at
> com.android.ide.common.workers.ExecutorServiceAdapter.close(ExecutorServiceAdapter.kt:69)
>   at
> com.android.build.gradle.internal.aapt.WorkerExecutorResourceCompilationService.close(WorkerExecutorResourceCompilationService.kt:67)
>   at
> com.android.build.gradle.tasks.MergeResources.doFullTaskAction(MergeResources.java:268)
>   at
> com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:106)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)     at
> org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)     at
> org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:47)
>   at
> org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:41)
>   at
> org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
>   at
> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.run(ExecuteActionsTaskExecuter.java:284)....................................

这是build-gradle:

classpath 'com.android.tools.build:gradle:3.4.1'

0 个答案:

没有答案