2015-05-20 9 views
10

Kiedy biegnęBłąd uruchomienia Android-x86 Emulator w Travis CI

android connectedCheck 

z emulatora ARM w Travis, kompilacja zwykle kończy się błędem timeout. Zamiast tego próbuję uruchomić moją kompilację i testy z emulatorem x86. Ale kiedy uruchomić polecenie:

emulator -avd test -no-skin -no-audio -no-window & 

otrzymuję ten błąd:

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). 

Zauważyłem w docs Travis CI, że nie wydaje się być wsparcie dla emulatorów x86, więc jestem asumming, że jest to możliwe. Ale nie byłem w stanie znaleźć żadnego odniesienia do ich poprawnego działania z akceleracją sprzętową. Próbowałem również uruchomić to polecenie:

sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils 

przed utworzeniem emulatora, ale nadal otrzymuję ten sam błąd.

Oto moja .travis.yml scenariusz:

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 

Czy ktoś dostał to działało wcześniej?

+0

Dlaczego poziom 19 a nie 22? –

+0

Mam ten sam błąd/pytanie ... To naprawdę jest do bani ... – z3ntu

Odpowiedz

6

Emulatory Intel nie mogą być jeszcze uruchomione na Travis. Ponieważ Travis uruchamia maszyny wirtualne, przyspieszenie sprzętowe w maszynie wirtualnej na innej maszynie wirtualnej jest trudne.

Na razie trzeba uruchamiać emulatory ARM.

Mogą to zrobić w najbliższej przyszłości. Subskrybuj ten problem, aby otrzymać powiadomienie. https://github.com/travis-ci/travis-ci/issues/1419

+1

dzięki za podanie linku do problemu. – jmsalcido