“已配置相关功能,但未设置包 ID."创建新模块 Android 时 [英] "Dependent features configured but no package ID was set." When creating a new module Android
问题描述
我正在尝试创建一个新模块.这个模块的元素应该对第一个模块可见.这就是为什么我将 implementation project(":messanger")
添加到 Build.gradle(:app)
但它给出以下错误:
I am trying to create a new module. Elements of this module should be visible to the first module.That is why I add implementation project(":messanger")
to Build.gradle(:app)
but it gives the following error:
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 文件中找到它,将其更改为使用库插件,它应该可以编译.
The module you have created is using the plugin 'com.android.application' and it should be using the 'com.android.library' plugin. You can find this in the build.gradle file in your module, change this to use the library plugin and it should compile.
这篇关于“已配置相关功能,但未设置包 ID."创建新模块 Android 时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!