就像这里的例子一样,我正在扩展我的构建类型来添加staging:
android {
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
applicationIdSuffix '.debug'
}
staging {
initWith release
applicationIdSuffix '.staging'
}
}
}
Run Code Online (Sandbox Code Playgroud)
但我也有一个依赖:
implementation project(':mylibrary')
Run Code Online (Sandbox Code Playgroud)
编译失败,因为它不知道要配对staging的内容:mylibrary:
* What went wrong:
Could not determine the dependencies of task ':app:compileStagingJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:stagingCompileClasspath'.
> Could not resolve project :mylibrary.
Required by:
project :app
> Unable to find a matching configuration of project :mylibrary:
- …Run Code Online (Sandbox Code Playgroud)