javiersantos / android-ci

A docker image for building Android apps. Supports multiple SDK Build Tools.
MIT License
111 stars 40 forks source link

Running connectedAndroidTest with emulator #3

Open Informaticore opened 6 years ago

Informaticore commented 6 years ago

I try to run the emulator with your image $ echo y | /sdk/tools/bin/sdkmanager update sdk but I am getting the error

$ echo y | /sdk/tools/bin/sdkmanager update sdk
Loading package information...                                                  
Loading local repository...                                                     
[                                       ] 3% Loading local repository...        
[                                       ] 3% Fetch remote repository...         
[                                       ] 3% Fetch remote repository...         
[=                                      ] 3% Fetch remote repository...         
[=                                      ] 3% Fetch remote repository...         
[=                                      ] 3% Fetch remote repository...         
[=                                      ] 3% Fetch remote repository...         
[=                                      ] 3% Fetch remote repository...         
[=                                      ] 3% Fetch remote repository...         
[=                                      ] 3% Fetch remote repository...         
[=                                      ] 3% Fetch remote repository...         
[=                                      ] 3% Fetch remote repository...         
[=                                      ] 3% Fetch remote repository...         
[=                                      ] 3% Fetch remote repository...         
[=                                      ] 4% Fetch remote repository...         
[=                                      ] 4% Fetch remote repository...         
[=                                      ] 4% Fetch remote repository...         
[=                                      ] 4% Fetch remote repository...         
[=                                      ] 4% Fetch remote repository...         
[=                                      ] 4% Fetch remote repository...         
[=                                      ] 4% Fetch remote repository...         
[=                                      ] 4% Fetch remote repository...         
[==                                     ] 5% Fetch remote repository...         
[==                                     ] 6% Fetch remote repository...         
[==                                     ] 6% Computing updates...               
[===                                    ] 8% Computing updates...               
[===                                    ] 8% Computing updates...               
[===                                    ] 10% Computing updates...              

**Warning: Failed to find package update**
[===                                    ] 10% Computing updates...              
ERROR: Job failed: exit code 1

Do you have any idea how to run the emulator on your image? Or what the error is?

Informaticore commented 6 years ago

I played around more and was able to get this step running. Now I am having trouble with some libQt5Widget missing error: /sdk/emulator/emulator64-x86: error while loading shared libraries: libQt5Widgets.so.5: cannot open shared object file: No such file or directory

Bitrise pointed to that: https://github.com/bitrise-io/build.issues/issues/39#issuecomment-267943134

sudo apt-get install libqt5widgets5

yorickvanzweeden commented 6 years ago

I played around more and was able to get this step running. Now I am having trouble with some libQt5Widget missing error: /sdk/emulator/emulator64-x86: error while loading shared libraries: libQt5Widgets.so.5: cannot open shared object file: No such file or directory

Bitrise pointed to that: bitrise-io/build.issues#39 (comment)

sudo apt-get install libqt5widgets5

You should run apt-get update and than run apt-get install libqt5widgets5

I'm running into the issue that KVM is not installed

yorickvanzweeden commented 6 years ago

I played around more and was able to get this step running. Now I am having trouble with some libQt5Widget missing error: /sdk/emulator/emulator64-x86: error while loading shared libraries: libQt5Widgets.so.5: cannot open shared object file: No such file or directory

Bitrise pointed to that: bitrise-io/build.issues#39 (comment)

sudo apt-get install libqt5widgets5

Check out https://github.com/yorickvanzweeden/android-ci. I have created an image with emulator support and a snapshot. The snapshot avoids a slow cold-boot of the emulator and speeds up the process.

smtrz commented 4 years ago

I am able to run the emulator from command line with sudo but with the jenkins users i am facing this issue:

Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb. ((null):0, (null))