1.這是微信上一個朋友分享給我的,之前用了的確不錯,但是因為要固定他的debug 渠道,所以后面就沒用了。至于這個朋友是誰,我居然給忘記了。尷尬了。
直接上東西了。
buildTypes {
//優(yōu)化編譯速度
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 第一次運行較慢,后面基本在一分鐘以內(nèi)。
不保證所有人通用。