报错如下:The currently selected variant "arm-debug" uses split APKs, but none of the 1 split apks are compatible with the current device with density "213" and ABIs "x86".
可以试试在Model中的build.grald中添加ndk、splits,举个例如下:
android{
...
defaultConfig {
applicationId "XXXXXXX"
minSdkVersion 11
targetSdkVersion 21
versionCode 126
versionName "1.2.6"
ndk {
//设置支持的SO库架构
abiFilters 'armeabi' //, 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
moduleName "app"
}
....
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a', 'mips'
universalApk true
}
}
}
你应该是用模拟器运行apk,但是你程序的JNI部分并没有针对模拟器的X86架构生成相应代码。