Android 构建失败 (aapt2) 时,作为应用程序构建为 Windows 系统帐户



我在gradle中有一个android版本。ANdroid gradle plugin 3.4.0,android build tools 28.0.3,compile SDK 24,open JDK 8 (ojdkbuild(,gradle (wrapper( version 5.4.0。当以本地用户帐户在 cmd 提示符下运行时,我能够在我的开发计算机以及我的 TeamCity 构建代理计算机上很好地构建和运行我的应用程序。但是,当 TeamCity 运行时(系统帐户(,或通过作为系统帐户打开的 cmd.exe提示符,我失败并出现以下错误。

我猜这是某种权限问题,但不幸的是,我不确定如何进行构建。安卓SDK安装在C:Program Files (x86)Androidandroid-sdk。视窗 7 虚拟机。

我尝试降级安卓 gradle 插件,并进行各种搜索,但还没有运气。

Execution failed for task ':MySubproj:verifyReleaseResources'. com.android.ide.common.workers.WorkerExecutorException: 27 exceptions were raised by workers:
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #1: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #2: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #3: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #4: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #5: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.

在构建gradle时,正在当前用户主目录中创建.gradle目录。

现在进入"用户"目录并尝试在主目录中搜索"SYSTEM"用户。(没有人(

所以,最简单的方法 - 创建一个用户并在此用户下启动服务。

提供对生成文件夹的访问权限。通常,这应该足以开始 gradle。

最新更新