场景
在开发过程中,新建的项目默认都是以app为启动的,当多个模块时,如果想想另一个模块(假设launcher模块)作为启动项,让app成为普通模块,该如何做?

解决方案
在需要成为启动模块的build.gradle中的第一行配置如下:
apply plugin: 'com.android.application';
在需要成为启动模块的build.gradle中配置applicationId,如下:
android{
defaultConfig{
applicationId "你自己的appID"
}
}
在app模块的build.gradle中的第一行配置如下:
apply plugin: 'com.android.library'