@All,
我已经编写了用于测试移动应用程序的appium脚本,并且在windows上它的工作方式就像魅力(我使用Genymotion作为Android模拟器)但在生产中我有Centos 7服务器(带图形界面),在这里我试图打开无头android模拟器'Jenkins-AndroidEmulator插件3.0)与maven的帮助,在运行我的maven命令之前,我尝试使用以下配置创建aavd模拟器: - 在centos7上我安装了android-26。 但是当我运行我的构建时,它会抛出以下错误: -
[android] Using Android SDK: /opt/android-sdk
[android] Creating Android AVD: /var/lib/jenkins/.android/avd/hudson_en-US_480_WVGA_android-26_x86_test.avd
[android] /opt/android-sdk/tools/bin/avdmanager create avd -f -c 32M -n hudson_en-US_480_WVGA_android-26_x86_test -k system-images;android-26;default;x86
Loading local repository...
[========= ] 25% Loading local repository...
[========= ] 25% Fetch remote repository...
[========= ] 25% Fetch remote repository...
[========= ] 25% Fetch remote repository...
[=======================================] 100% Fetch remote repository...
Error: Package path is not valid. Valid system image paths are:
null
[android] Failed to run AVD creation command
[android] Could not create Android emulator: Failed to run AVD creation command
Finished: NOT_BUILT
答案 0 :(得分:0)
您找到了解决方案吗?据我所知,jenkins中的默认值无法识别,请尝试手动执行此命令/opt/android-sdk/tools/bin/avdmanager create avd -f -c 32M -n hudson_en-US_480_WVGA_android-26_x86_test -k system-images;android-26;google_apis_playstore;x86
答案 1 :(得分:0)
我遇到了与您相同的问题,但控制台输出显示:
[android] /Users/jenkins/.android-sdk/tools/bin/avdmanager create avd -f -c 64M -n hudson_en-US_420_1080x1920_android-26_x86_Nexus-5X -k system-images;android-26;default;x86
Loading local repository...
[========= ] 25% Loading local repository...
[========= ] 25% Fetch remote repository...
[========= ] 25% Fetch remote repository...
[========= ] 25% Fetch remote repository...
[=======================================] 100% Fetch remote repository...
Error: Package path is not valid. Valid system image paths are:
system-images;android-24;default;x86_64
system-images;android-25;google_apis;x86_64
system-images;android-24;default;armeabi-v7a
system-images;android-25;android-wear;x86
system-images;android-23;google_apis;x86_64
所以我将 Target ABI 更改为 x86_64 ,并将 Android OS版本更改为 7.0 以匹配 “ system-images; android-24; default; x86_64”
然后模拟器可以正常工作:
[android]模拟器可以使用了(耗时84秒)