1.如果是打不签名包,首先选择select build variant中设置为想打的包,然后选择 build apk
2.如果想生成签名包就按照签名包的方式生成选择即可
其中注意事项:
sourceSets {
main {
manifest.srcFile'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
}
ainnertest{
res.srcDirs = ['res']
}
gggg{
res.srcDirs = ['gggg/res']
}