问题一:Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows.
解决方案
出现这个问题一般都是存放源码的文件名中包含了中文字符,我们只需要将源码文件名中带有中文名字的部分修改掉然后重新sync一下即可(养成写英文的习惯哦)
问题二:目标版本不一致
这个按照下面提示安装版本即可
问题三:device support x86 but apk only supports armeabi-v7
使用虚拟机运行时出现这个问题即apk不支持x86,我们只需要在项目的build中修改
defaultConfig {
//选择性打包,我们添加x86
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
之后重新加载项目即可。
问题四:Invoke-customs are only supported starting with Android N (–min-api 26)
解决办法:在build.gradle中添加如下:
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
//在android内部添加如下两行即可
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}