在build.gradle中添加或者加入如下关键代码
android{
...
defaultConfig {
ndk {
abiFilters 'armeabi-v7a'//如果只是在手机上运行的话,就只需要32位的支持库即可在所有手机上运行,但是模拟器估计就闪退。
}
}
buildTypes {
release{
minifyEnabled true // 允许Proguard优化apk大小, 混淆代码
//Zipalign优化
zipAlignEnabled true
// 移除无用的resource文件
shrinkResources true
...
}
}
}