Rap*_*ira 4 jenkins jenkins-plugins android-emulator-plugin
我正在尝试为Jenkins 配置android模拟器插件,我很难弄清楚插件无法找到Android SDK的原因.
首先,克隆项目后Jenkins总是输出:
[android] No Android SDK found; let's install it automatically...  
[android] Going to install required Android SDK components...  
[android] Installing the 'platform-tool,tool' SDK component(s)...  
$ /var/lib/jenkins/tools/android-sdk/tools/android update sdk -u -a -t platform-tool,tool
Run Code Online (Sandbox Code Playgroud)
之后,它失败了,因为插件可能不知道如何回答许可协议.
Do you accept the license 'android-sdk-license-bcbbd656' [y/n]: 
Unknown response ''.
Do you accept the license 'android-sdk-license-bcbbd656' [y/n]: 
Unknown response ''.
Max number of retries exceeded. Rejecting 'android-sdk-license-bcbbd656'
Run Code Online (Sandbox Code Playgroud)
所以我只是复制命令我自己并安装了所有的东西.输出保持不变,未找到Android SDK.我试图chown和chmod 755文件夹,以确保Jenkins可以访问它,并再次失败.
我检查了Jenkins配置,我可以明确地告诉Jenkins android SDK在哪里,但知道它失败并出现另一个错误:我用/ var/lib/jenkins/tools/android-sdk /填充了Android SDK根目录但显示必需找不到工具(adb等).
这是我在/ var/lib/jenkins/tools/android-sdk中的ls -la
drwxr-xr-x  9 jenkins jenkins 4096 May 16 11:12 .
drwxr-xr-x  5 jenkins jenkins 4096 May 15 20:20 ..
-rwxr-xr-x  1 jenkins jenkins    6 May 16 12:36 .jenkins-install-info
-rwxr-xr-x  1 jenkins jenkins    0 Dec 20 20:00 .timestamp
-rwxr-xr-x  1 jenkins jenkins 1158 Dec  6 16:50 SDK Readme.txt
drwxr-xr-x  2 jenkins jenkins 4096 May 15 19:45 add-ons
drwxr-xr-x  3 jenkins jenkins 4096 May 16 09:02 build-tools
drwxr-xr-x 19 jenkins jenkins 4096 May 16 09:49 docs
drwxr-xr-x  3 jenkins jenkins 4096 May 16 11:12 platform-tools
drwxr-xr-x  8 jenkins jenkins 4096 May 16 10:43 platforms
drwxr-xr-x  2 jenkins jenkins 4096 May 16 11:12 temp
drwxr-xr-x  9 jenkins jenkins 4096 May 16 11:11 tools
Run Code Online (Sandbox Code Playgroud)
这也是LS -la在的/ var/lib中/詹金斯/工具/ Android的SDK /平台的工具
drwxr-xr-x 3 jenkins jenkins    4096 May 16 11:12 .
drwxr-xr-x 9 jenkins jenkins    4096 May 16 11:12 ..
-rwxr-xr-x 1 jenkins jenkins  467531 May 16 11:12 NOTICE.txt
-rwxr-xr-x 1 jenkins jenkins 1226659 May 16 11:12 adb
drwxr-xr-x 2 jenkins jenkins    4096 May 16 11:12 api
-rwxr-xr-x 1 jenkins jenkins  176550 May 16 11:12 fastboot
-rwxr-xr-x 1 jenkins jenkins   16644 May 16 11:12 source.properties
Run Code Online (Sandbox Code Playgroud)
这清楚地表明adb在那里并按照上面的命令运行:
sudo -u jenkins ./adb version
Android Debug Bridge version 1.0.31
Run Code Online (Sandbox Code Playgroud)
任何有关此问题的帮助将非常感激.
|   归档时间:  |  
           
  |  
        
|   查看次数:  |  
           4564 次  |  
        
|   最近记录:  |