Andorid/build.gradle 增加
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
namespace project.group
}
}
def manifestFile = project.android.sourceSets.main.manifest.srcFile
if (manifestFile.exists()) {
def manifestText = manifestFile.text
if(manifestText.contains('package=')) {
manifestText = manifestText.replaceAll(/package="[^"]*"/,"")
manifestFile.text = manifestText
}
}
}
}
}