Khi tôi chạyLỗi khi chạy Android x86 Emulator trong Travis CI
android connectedCheck
với một giả lập ARM trong Travis, xây dựng thường kết thúc vào một lỗi Timeout. Vì vậy, tôi thay vì cố gắng để chạy xây dựng và thử nghiệm của tôi với giả lập x86. Nhưng khi tôi chạy lệnh:
emulator -avd test -no-skin -no-audio -no-window &
tôi nhận được lỗi này:
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure KVM is properly installed and usable.
CPU acceleration status: KVM is not installed on this machine (/dev/kvm is missing).
tôi đã nhận thấy trong các tài liệu Travis CI rằng có không xuất hiện để được hỗ trợ cho các giả lập x86, vì vậy tôi asumming rằng nó là có thể. Nhưng tôi đã không thể tìm thấy bất kỳ tài liệu tham khảo để làm cho họ hoạt động đúng với tăng tốc phần cứng. Tôi cũng đã thử chạy lệnh này:
sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
trước khi tạo trình mô phỏng nhưng tôi vẫn gặp lỗi tương tự.
Đây là kịch bản .travis.yml tôi:
language: android
jdk: oraclejdk7
env:
global:
- ANDROID_BUILD_API_LEVEL=22
- ANDROID_BUILD_TOOLS_VERSION=22.0.1
- ANDROID_ABI=default/x86
- ANDROID_EMULATOR_API_LEVEL=19
android:
components:
#- platform-tools
#- tools
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
- android-$ANDROID_BUILD_API_LEVEL
- android-$ANDROID_EMULATOR_API_LEVEL
- addon-google_apis_x86-google-$ANDROID_EMULATOR_API_LEVEL
- extra-google-google_play_services
- extra-android-support
- extra-google-m2repository
- extra-android-m2repository
- sys-img-x86-android-$ANDROID_EMULATOR_API_LEVEL
notifications:
email: true
before_script:
- sudo apt-get update -qq
- sudo apt-get install -qq libstdc++6:i386 lib32z1 expect
# for gradle output style
- export TERM=dumb
# environment info
- ./gradlew -v
- uname -a
# emulator
- echo no | android create avd --force -n test -t "Google Inc.:Google APIs (x86 System Image):"$ANDROID_EMULATOR_API_LEVEL --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
# build
script:
- ./gradlew clean connectedCheck -PdisablePreDex
Có ai bị này để làm việc trước đây?
Tại sao cấp 19 và không phải là 22? –
Tôi có cùng một lỗi/câu hỏi ... Điều đó thực sự hút ... – z3ntu