Android 开发 关于APP无法安装到Android模拟器上的问题

    我们在创建一个app后,打算安装到Android模拟器上。可能会出现无法安装,或者提示已经安装无法卸载的问题。这个时候需要添加兼容CPU。

选择 build.gradle 文件打开添加如下代码:

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.2'
    defaultConfig {
        applicationId "demo.yt.test"
        minSdkVersion 23
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        //cpu框架支持
        splits {
            abi {
                enable true
                reset()
                include 'x86', 'armeabi-v7a', 'x86_64'
                universalApk true
            }
        }
    }
}
原文地址:https://www.cnblogs.com/guanxinjing/p/9869026.html