2

已将 Studio 更新到 3.5(从 3.1)。Gradle 升级到 3.5.0(之前是项目中的 3.1.2)。

构建时出现错误:“不支持的操作系统。” (在更新项目建设之前没有错误)

系统是“Linux Mint 4.4.0-112-generic #135~14.04.1-Ubuntu SMP Tue Jan 23 20:41:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux”

我试过:重新下载SDK,重启系统,安装 .....同样的错误

UPD:通过降级 Gradle 修复,但无论如何有新版本的解决方案吗?

Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeDebugResources'
... 3 more

Caused by: org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$MultipleTaskActionFailures: Multiple task action failures occurred
... 35 more

Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
... 80 more

Caused by: com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.5.0-5435860-linux Daemon #0: AAPT2 is not supported on 32-bit Linux, see supported systems on https://developer.android.com/studio#system-requirements-a-namerequirementsa

at com.android.builder.internal.aapt.v2.Aapt2Daemon.handleError(Aapt2Daemon.kt:162)
at com.android.builder.internal.aapt.v2.Aapt2Daemon.checkStarted(Aapt2Daemon.kt:57)
at com.android.builder.internal.aapt.v2.Aapt2Daemon.compile(Aapt2Daemon.kt:91)
at com.android.builder.internal.aapt.v2.Aapt2DaemonManager$LeasedAaptDaemon.compile(Aapt2DaemonManager.kt:169)
at com.android.build.gradle.internal.res.Aapt2CompileRunnable$run$1.invoke(Aapt2CompileRunnable.kt:38)
at com.android.build.gradle.internal.res.Aapt2CompileRunnable$run$1.invoke(Aapt2CompileRunnable.kt:29)
at com.android.build.gradle.internal.res.namespaced.Aapt2DaemonManagerService.useAaptDaemon(Aapt2DaemonManagerService.kt:66)
at com.android.build.gradle.internal.res.namespaced.Aapt2DaemonManagerService.useAaptDaemon$default(Aapt2DaemonManagerService.kt:64)
at com.android.build.gradle.internal.res.Aapt2CompileRunnable.run(Aapt2CompileRunnable.kt:35)
at com.android.build.gradle.internal.tasks.Workers$ActionFacade.run(Workers.kt:335)
... 3 more
Caused by: java.lang.IllegalStateException: Unsupported operating system.
at com.android.builder.internal.aapt.v2.Aapt2Daemon.checkStarted(Aapt2Daemon.kt:60)
... 29 more
4

2 回答 2

0

就我而言,我错误地使用了 java 32 位。下载了 jdk x64,一切都恢复了。

于 2020-05-21T01:53:00.560 回答
0

AAPT2 aapt2-3.5.0-5435860-linux 守护进程 #0:32 位 Linux 不支持 AAPT2,请参阅https://developer.android.com/studio#system-requirements-a-namerequirementsa上支持的系统

从您的错误日志中AAPT2 is not supported on 32-bit Linux,您需要重新安装 64 位 Linux 系统

于 2019-09-11T15:07:58.613 回答