有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java在创建apk文件时发现错误“:app:mergeDebugResources”

当我第一次用安卓制作apk文件时。 我有这个错误。有人能帮我吗

**任务“:app:mergeDebugResources”的执行失败

Could not resolve all files for configuration ':app:_internal_aapt2_binary'. Could not resolve com.安卓.tools.build:aapt2:3.6.2-6040484. Required by: project :app No cached version of com.安卓.tools.build:aapt2:3.6.2-6040484 available for offline mode. No cached version of com.安卓.tools.build:aapt2:3.6.2-6040484 available for offline mode. * 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 4s 5 actionable tasks: 5 executed**


共 (1) 个答案

  1. # 1 楼答案

    此错误通常是由于Gradle在脱机模式下运行而发生的:-

    在命令行选项中转到File-Project Settings-Build、Execution、Deployment-Gradle-Remove offline,禁用Gradle的脱机模式。(或者,只需单击渐变窗口中的-/-图标。)

    然后,连接到internet并运行Gradle build

    生成运行一次后,可以再次启用脱机模式