- 首先,确保你已经在SDK Manager中下载了Automotive Intel x86 Atom系统镜像。
- 在Android Studio中,选择File -> Project Structure -> SDK Location,然后在针对SDK Location的下拉列表中,找到Android SDK Location,并单击Edit。
- 在打开的窗口中,选择SDK Platforms标签页。
- 在该标签页中,选择Show Package Details,以查看所有可用的系统镜像。
- 确保你已经选择了Automotive Intel x86 Atom系统镜像,并安装了它们。
- 如果上述步骤无法解决问题,则可以尝试通过手动更改您的gradle文件来处理它。在您的build.gradle文件中,将以下语句添加到android部分:
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a', 'mips'
universalApk false
}
}
//设置x86的BuildType特性
applicationVariants.all { variant ->
variant.outputs.each { output ->
def abi = output.getFilter(OutputFile.ABI)
if (abi != null && abi.contains("x86")) {
outputFileName = "app-x86.apk"
}
}
}
//设置x86的编译代码
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.package.name"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
ndk {
abiFilters "x86"
}
externalNativeBuild {
cmake {
cppFlags "-std=c++11 -frtti -fexceptions"
abiFilters 'x86'
}
}
}
externalNativeBuild {
cmake {
path "