java - 科尔多瓦构建错误任务:app:mergeDebugResources FAILED on linux:arm64
问题描述
我在kali linux上做了一个cordova项目(使用android中的termux在vm上运行:arm64)。当我运行cordova run browser
它运行成功。但是当我运行cordova build android
它时失败并出现这些错误
$ cordova build android
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=/usr/Android-Sdk (recommended setting)
ANDROID_HOME=undefined (DEPRECATED)
Using Android SDK: /usr/Android-Sdk
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details
> Task :app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Multiple task action failures occurred:
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-linux Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-linux Daemon #2: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-linux Daemon #7: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-linux Daemon #5: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-linux Daemon #4: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-linux Daemon #3: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-linux Daemon #6: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> AAPT2 aapt2-4.0.0-6051327-linux Daemon #1: Daemon startup 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.org
BUILD FAILED in 1m 8s
28 actionable tasks: 18 executed, 10 up-to-date
Command failed with exit code 1: /root/hello/platforms/android/gradlew cdvBuildDebug -b /root/hello/platforms/android/build.gradle
$
这出了什么问题;gradle 显示“gradle daemon 1 incomptible”这个设备架构问题?
科尔多瓦要求在这里输出: -
$ cordova requirements
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-29,android-28
Gradle: installed /usr/gradle/bin/gradle
$
和 gradle -version 输出是-
$ gradle -version
------------------------------------------------------------
Gradle 6.7.1
------------------------------------------------------------
Build time: 2020-11-16 17:09:24 UTC
Revision: 2972ff02f3210d2ceed2f1ea880f026acfbab5c0
Kotlin: 1.3.72
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM: 1.8.0_271 (Oracle Corporation 25.271-b09)
OS: Linux 3.18.120-perf-gd85b39b aarch64
$
解决方案
好的,我不是这方面的专家,但我遇到了类似的问题,我通过
cordova run build
打开互联网连接运行来修复它。我认为您需要互联网连接来构建科尔多瓦应用程序。
推荐阅读
- .net - 将 IIS 托管的 .NET WebApp 从 Windows 2008 Server 迁移到 Windows 2019 Server
- node.js - 在 Node.js 中生成 GUI 子进程但隐藏 GUI
- java - 将分数从任何基数转换为小数 - 无法使用 BigDecimal 的负幂
- android - Android 上的 IllegalArgumentException 当按文件名排序文件时,java.lang.IllegalArgumentException:比较方法违反其一般合同
- c++ - 是否允许在模板参数上使用 typedef
- tensorflow - 是否可以将 MobileNet V1 SSD FPN 转换为 tflite 格式?
- sql-server - 使用外部数据源部署 Azure SQL Server
- html - 使用 Tailwind CSS 为 WordPress 网站的特定页面或特定页面的元素设置样式
- xgboost - XGBoost 和 StratifiedKFold XGboostError “数据集仅包含 pos 或 neg 样本”
- snapshot - 需要有关 dolphindb 快照引擎的更多信息