1、上传Moudle时禁用BuildConfig.class:
在Moudle的build文件中,添加packageBuildConfig配置
android {
// 禁用BuildConfig
packageBuildConfig false
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 17
targetSdkVersion 25
}
buildTypes {
...
}
}