Android Studio更新到最新的2.2.3 ,如果編譯工具的配置爲
android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion 25
buildToolsVersion '24.0.3'
defaultConfig {
applicationId "com.xxxx"
minSdkVersion 16
targetSdkVersion 23
versionName "1.0.6"
versionCode versionCodeThinkId
ndk {
// 設置支持的SO庫架構
abiFilters 'armeabi', 'x86'//, 'armeabi-v7a', 'x86_64', 'arm64-v8a'
//
}
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
這種情況下會出現這個bug, app啓動直接閃退
修復方法:
更新至最新的build-tools
android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.xxxx"
minSdkVersion 16
targetSdkVersion 23
versionName "1.0.6"
versionCode versionCodeThinkId
ndk {
// 設置支持的SO庫架構
abiFilters 'armeabi', 'x86'//, 'armeabi-v7a', 'x86_64', 'arm64-v8a'
//
}
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
保證 compileSdkVersion 和 buildToolsVersion 的大版本號統一 ,修改之後,不會再出現了