The currently selected variant "debug" uses split APKs, but none of the 1 split apks are compatible

在Android studio模拟机上运行apk,失败,报错,The currently selected variant "debug" uses split APKs, but none of the 1 split apks are compatible with the current device with density "420" and ABIs "x86".

解决方法:需要在app的gradle文件中ndk中加入'x86',如下:

  ndk {
            //选择要添加的对应cpu类型的.so库。
            abiFilters 'armeabi', 'armeabi-v7a', 'armeabi-v8a','x86'
            // 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
        }


你可能感兴趣的:(Android基础知识)