1.这是微信上一个朋友分享给我的,之前用了的确不错,但是因为要固定他的debug 渠道,所以后面就没用了。至于这个朋友是谁,我居然给忘记了。尴尬了。
直接上东西了。
buildTypes {
//优化编译速度
productFlavors {
// Define separate dev and prod product flavors.
dev{
// dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
// to pre-dex each module and produce an APK that can be tested on
// Android Lollipop without time consuming dex merging processes.
minSdkVersion21
}
prod{
// The actual minSdkVersion for the application.
minSdkVersion14
}
}
debug {
minifyEnabledfalse
}
}
我的电脑是低配的pro 运行的版本要是devdebug 第一次运行较慢,后面基本在一分钟以内。
不保证所有人通用。