我在创建虚拟设备时遇到No ABI错误.我的设置包括
Android SDK
ADT插件
日食
我跑的时候
android list targets
Run Code Online (Sandbox Code Playgroud)
它给了我
Name: Android 4.0.3
Type: Platform
API level: 15
Revision: 2
Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720,
WXGA800
ABIs : no ABIs.
Run Code Online (Sandbox Code Playgroud)
当我试图跑
android create avd -n myandroid -t 1
Run Code Online (Sandbox Code Playgroud)
它给
This platform has more than one ABI. Please specify one using --abi.
Run Code Online (Sandbox Code Playgroud)
如何指定ABI并因此创建AVD
我正在尝试将Android项目从使用API Level 19 SDK和构建工具更新到最新的API Level 21,包括Google API.在此更新之前,Travis上的所有内容都运行良好(例如,请参阅此版本).
当我使用新的API级别运行时,我看到以下错误:
0.42s$ echo no | android create avd --force -n test -t "Google Inc.:Google APIs:"$ANDROID_API_LEVEL --abi $ANDROID_ABI
Valid ABIs: no ABIs.
Error: Invalid --abi armeabi-v7a for the selected target.
The command "echo no | android create avd --force -n test -t "Google Inc.:Google APIs:"$ANDROID_API_LEVEL --abi $ANDROID_ABI" failed and exited with 1
Run Code Online (Sandbox Code Playgroud)
有关完整的Travis输出,请参阅此构建.
这是我的.travis.yml:
language: android
jdk: oraclejdk7
# Turn off caching to avoid any caching problems
cache: false
# …Run Code Online (Sandbox Code Playgroud) 在我写这个问题之前,我已经搜索了相同的问题,他们确实导出了许可证,因为仍然使用alpha版本的约束布局.但是现在android已经发布了稳定版的约束布局.我尝试了很多设置,但仍然失败了..
我的最新消息 .travis.yml
language: android
jdk: oraclejdk8
android:
components:
- platform-tools
- tools # to get the new `repository-11.xml`
- tools # see https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943)
- build-tools-25.0.0
- android-25
# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
licenses:
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
script:
- ./gradlew clean build
Run Code Online (Sandbox Code Playgroud)
这是我的 build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.package.my"
minSdkVersion 16
targetSdkVersion 25
versionCode 6
versionName "1.3.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled …Run Code Online (Sandbox Code Playgroud) android gradle android-sdk-tools travis-ci android-constraintlayout
模拟器启动,但没有进一步启动"android"闪烁文本.
由...开始
Android/Sdk/emulator/emulator @Nexus_5X_API_25 -verbose
Run Code Online (Sandbox Code Playgroud)
在日志中只重复记录
emulator: MemoryReport: Epoch: 140737476643856, Res/ResMax/Virt/VirtMax: 737525760 737525760 5164826624 5302894592
Run Code Online (Sandbox Code Playgroud)
如何修复/调试它?..
KVM端虚拟化工作正常,但在更新到仿真器26.1.2-4077558后突然停止.
更新
感谢albodelu有关更新到26.1.3的信息.更新后我有:
KVM is required to run this AVD.
Unknown Error
Please file a bug against Android Studio.
Run Code Online (Sandbox Code Playgroud)
KVM已启用.这是我通过向模拟器二进制文件添加可执行权限而修复的初始错误.所以这样做了.强制模拟器通过以下方式工作:
chmod a+x ~/Android/Sdk/emulator/emulator*
chmod a+x ~/Android/Sdk/emulator/lib64/lib*
chmod a+x ~/Android/Sdk/emulator/qemu/linux-x86_64/*
chmod a+x ~/Android/Sdk/emulator/qemu-img
chmod a+x ~/Android/Sdk/tools/emulator*
chmod a+x ~/Android/Sdk/tools/android
chmod a+x ~/Android/Sdk/tools/bin/*
Run Code Online (Sandbox Code Playgroud)
而现在奇迹:)两个模拟器设备都在工作.
我一直在使用以下命令安装abi直到今天.
echo y | android update sdk --no-ui --all --filter sys-img-armeabi-v7a-android-23
Run Code Online (Sandbox Code Playgroud)
但现在我收到了以下错误.
Error: Ignoring unknown package filter 'sys-img-armeabi-v7a-android-23'
Warning: The package filter removed all packages. There is nothing to install.
Please consider trying to update again without a package filter.
Run Code Online (Sandbox Code Playgroud)
有人有同样的问题吗?我正在使用Android SDK r24.4.1.