已配置相关功能,但未设置包 ID

问题描述 投票:0回答:2

我正在为两个应用程序(例如用户应用程序和管理应用程序)使用两个模块。一切都在调试中完美运行。但在调试时突然出现错误,如 “已配置依赖功能,但未设置包 ID。” 我现在无法调试。有人可以帮助我吗?

android debugging pack
2个回答
1
投票

请检查

应用程序模块:

plugins{
    id "com.android.application"
    ...
}

库模块:

plugins{
    id "com.android.library"
    ...
}

他们使用不同的插件,当你使用多个模块时需要小心。


0
投票

我也遇到了同样的问题。所有其他解决方案都假设第二个模块是一个库,但我的需要是一个应用程序模块。我通过将 configuration:'default' 添加到实现项目依赖项来解决它:

 implementation project(path: ':app:your_module_name', configuration:'default')
© www.soinside.com 2019 - 2024. All rights reserved.