Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication

来源:互联网 发布:金和网络老十佳 编辑:程序博客网 时间:2024/06/06 02:25

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 的大版本号统一 ,修改之后,不会再出现了

0 0
原创粉丝点击