Android studio 2021.1
id("com.android.application") version "7.2.0" apply false
id ("com.android.library") version "7.2.0" apply false
id ("org.jetbrains.kotlin.android") version "1.6.10' apply false
我想把项目和lib中的build.gradle的内容做一个common_config.gradle进行统一的配置,在common_config.gradle中调用composingBuild中的内容,但是在build.gradle引入apply from: "common_config.gradle"时出现错误
Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'BuildConfig' for object of type org.gradle.internal.extensibility.DefaultExtraPropertiesExtension.
找不到 composingbuild中的内容,不知道是什么情况 ,大神是否遇到或者有解决方案
(去掉composingbuild时common_config.gradle是可用的)
Project directory '/Users/username/Downloads/ComposingBuilds-vs-buildSrc-master/Project-ComposingBuild/versionPlugin' is not part of the build defined by settings file '/Users/username/Downloads/ComposingBuilds-vs-buildSrc-master/Project-ComposingBuild/settings.gradle'. If this is an unrelated build, it must have its own settings file.