android项目报错:“Dependent features configured but no package ID was set”
android项目报错:“Dependent features configured but no package ID was set”
·
别人的解决方法:
将build.gradle中plugins里的 com.android.application 改为 com.android.library
我的解决方法:
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'e4d
implementation project(path: ':chapter05')
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
经过和别的module的对比,我发现在build.gradle的依赖节点里多了一个“implementation project(path: ':chapter05')”,意思是本module依赖了另一个module(chapter05),我把这行删掉就可以正常运行了。可能是因为我这个module从上一个module里搬来了好多代码的原因,记录一下。
更多推荐
已为社区贡献2条内容
所有评论(0)