我用
创建了一个新项目cordova create test
cd test
cordova platform add android
cordova build android
这就是我得到的
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.
Aapt2InternalException: AAPT2 aapt2-3.3.0-5013011-windows Daemon #0: Daemon star
tup failed
This should not happen under normal circumstances, please file an issue if it
does.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org20 actionable tasks: 20 executed
BUILD FAILED in 21s
Exception in thread "ForkJoinPool.commonPool-worker-1" java.lang.IllegalStateExc
eption: AAPT Process manager cannot be shut down while daemons are in use
at com.android.builder.internal.aapt.v2.Aapt2DaemonManager.shutdown(Aapt
2DaemonManager.kt:96)
at com.android.build.gradle.internal.res.namespaced.RegisteredAaptServic
e.shutdown(Aapt2DaemonManagerService.kt:61)
at com.android.build.gradle.internal.workeractions.WorkerActionServiceRe
gistry$shutdownAllRegisteredServices$1$1.run(WorkerActionServiceRegistry.kt:96)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoin
Task.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java
:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.ja
va:157)
D:\development\apps\test\platforms\android\gradlew: Command failed with exit cod
e 1 Error output:
FAILURE: Build failed with an exception.
我已经下载了最新版本的 Cordova、Android Studio 和 Gradle,但问题仍然存在。