Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: The currently selected variant "debug" uses split APKs, but none of the 1 split apks are compatible with the current device with ABIs "x86_64, arm64-v8a".
原因:运行'app'时出错,因为无法确定应用程序ID。当前选择的变体是“debug”,它使用了分割APKs,但没有一个与当前设备兼容(设备ABI是x86_64, arm64-v8a)。
解决方案:在项目的build.gradle 文件中指定abiFilters,已确保生成的APK包含对“x86_64”架构的支持
android {
defaultConfig {
ndk {
abiFilters 'x86_64' // 加入x86_64架构支持
}
}
}