android-studio - “已配置相关功能,但未设置包 ID。” 创建新模块 Android 时
问题描述
我正在尝试创建一个新模块。这个模块的元素应该对第一个模块可见。这就是我添加的原因implementation project(":messanger")
,Build.gradle(:app)
但它给出了以下错误:
Dependent features configured but no package ID was set.
Execution failed for task ':app:processDebugResources'.
A failure occurred while executing
com.android.build.gradle.internal.tasks.Workers$ActionFacade
AAPT2 aapt2-4.0.0-beta01-6051327-linux Daemon #0: Unexpected error during link, attempting
to
stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
解决方案
您创建的模块正在使用插件“com.android.application”,它应该使用“com.android.library”插件。您可以在模块的 build.gradle 文件中找到它,将其更改为使用库插件,它应该可以编译。
推荐阅读
- node.js - 在for循环中调用多个API并使用node js得到一一响应
- javascript - 有没有一种方法可以让我不必在 onepager 上微调我的边距和填充?
- python - NoReverseMatch 在 /cars/
- c# - 如何处理 C# 中延迟的 CMD 提示?
- java - Dijkstra 的最短路径算法中的 ArrayIndexOutOfBoundsException
- node.js - 如何在以下条件下提供我的静态文件
- python - 在列表理解的迭代之后创建每个元素的列表
- javascript - 在按钮单击 AngularJS 上的元素之间切换
- php - PHP:我怎么知道是什么导致了 500 服务器错误?
- azure-devops - Azure DevOps 2020 - 如何选择为发布管道下载哪些工件 (18.170.30525.1 (Azure DevOps Server 2020))