I installed Android SDK and JDK on Ubuntu Server 14.04 x64. But when I run the AVD, I got
error: 'SDL init failure, reason is: No available video device'
I follow this https://stackoverflow.com/a/6965679
sudo apt-get install ia32-libs
but didn't work.
Should I install any desktop on Ubuntu Server?
Try to run emulator without GUI following these steps:
From: http://paulemtz.blogspot.com/2013/05/android-testing-in-headless-emulator.html
Then, to run the headless emulator:
emulator -avd test -no-skin -no-audio -no-window
The '-no-skin' option removes the emulator buttons such as the home and other hardware keyboard buttons.
The '-no-audio' option disables the audio support.
Finally, the '-no-window' option disables the emulator's graphical window display.
Note that -avd test would need to be modified to refer to your specific emulator image (AVD).
You cannot run an emulator on the Server version of Ubuntu. The Emulator requires a GUI. Which the Server OS does not possess.
Rather use an Ubuntu Desktop OS
Then network your Server and Desktop, get the APK and upload it.
If you still wish to use Ubuntu Server with a GUI, refer to this, and repost the question with Ubuntu Server tags.
Related
on Ubuntu 16.04 I have installed AndroidStudio and via its AVD manager GUI did create tow new devices. now on Terminal when I type emulator -list-avds it lists the devices correctly, but when run emulator -avd <name> I face errors:
[139684796983104]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib
Could not launch '/home/amir/../emulator/qemu/linux-x86_64/qemu-system-i386': No such file or directory
How should I solve it?
both in Windows 10 and Ubuntu I was facing the same problem. the simple solution is that I had to go to the directory of tools then execute the command. for instance in windows.
$ cd C:\Users\user-name\AppData\Local\Android\sdk\tools
emulator -avd <deviceName>
also it is good to mention I wanted that for React-Native development, and Expo XDE saved me
I am running android studio 2.3.3 on ubuntu Gnome 17.04 when running the android app on the emulator it gives timeout error after "waiting for target device to come online", Actually the emulator doesn't start even when trying to start it alone from the AVD manager. I tried all the solutions in the following links but still not working.
Waiting for Target Device to Come Online
Android Studio Waiting for Target Device to Come Online Linux Mint 18
Android Studio Waiting for Target Device to Come Online Linux Mint 18
Note: The app is working on a physical device
Here are some screenshots from android studio:
Try creating a new AVD with different API and also use the recommended ones for better support for API's .
Hope this helps
The emulator now starts and the problem was solved by locating lib64 folder since i am running ubuntu 64 bit. In my case, its located under ~/Android/Sdk/emulator/lib64. Then run the following commands in terminal :
// Double Check to see if these are available
$ sudo apt-get install lib64stdc++6:i386
$ sudo apt-get install mesa-utils
// Navigate to the ~/Android/Sdk/emulator/lib64 folder
$ mv libstdc++/ libstdc++.bak
$ ln -s /usr/lib64/libstdc++.so.6 libstdc++
Source: How can I get more information about "Waiting for target device to come online" in Android Studio?
Using android studio on W10 had the same problem with the emulator tried all of the answers on StackOverflow: none worked for me until was playing with settings on Emulator, problem was because of OpenGL
Fix: the "More" button on emulator ----> Setting ----> Advanced
1- OpenGL ES Renderer: scroll to select Desktop Native OpenGL.
2- OpenGL ES API Level: scroll to select Compatibility OpenGL.
I receive the following error when I run android --emulator on my cmd;
Cannot run your app in the native emulator. Increase the timeout of the operation with the --timeout option or try to restart your adb server with 'adb kill-server' command. Alternatively, run the Android Virtual Device manager and increase the allocated RAM for the virtual device.
I've opened it with administrator rights and ran all the tutorials on the website.
I'm now stuck at this point and haven't been able to find the solution.
I've also tried tns run android --emulator --timeout -0 and waited for an hour without result.
What can i do to get the emulator running?
I had the same problem, I solved by opening avd manager and try starting the virtual device(emulator) you created. If the emulator doesnt launches, you will get an error in the console.
For me I had to install the intel HAXM, for launching the emulator
You just need to open your Android Virtual Device Manager and download
the latest emulator. Then run your application again.It will work.
tns run android
Runs the Emulator and then run the app on it.
Sometimes both process can't happen at once, admin access in Linux can be such case.
try starting the Emulator first then the app.
emulator -avd avd_name [ {-option [value]} … ]
for example:
sudo $ANDROID_HOME/emulator/emulator -avd test -netdelay none -netspeed full
'sudo' is important for Linux users.
then use this to start the app.
tns run android
I'm new on Ubuntu and install Ubuntu 14.04 LTS and for framework I download non-installable Android Studio and SDK tools separately.
I tried this link for Installing USB device on Ubuntu. I succeed in installing USB as MTP. but it wont load in Android Studio. when I run my app "waiting for adb" dialog is shown and finnaly says ADB not responding.
first I thought this is because I don't install adb so I install it with command:
sudo apt-get install android-tools-adb
but still phone wont load for launch app. is this ADB issue or cause my Android Studio is wont installed or some thing else.
in Ubuntu you have to create a rules file called 51-android.rules.
here is the details link: Unable to use my Android device as Android emulator using Android studio
here is the gitHub links: 51-android or
51-android.rules
if you have tried many terminal commands to connect your physical device to android studio in ubuntu and you failed to connect try this :-
Connect your device and change your USB preference(device notification) to PTP,android studio will detect your device.
I'm trying to run android emulator on terminal I have downloaded android sdk on VM ubuntu server (Thus I dont have graphic desktop, only terminal console).
I want to run emulator on terminal as a service that I can use for install App and run some tests(battery consumption, install, others).
I want to create some AVD and run test scripts on it.
But, I cant launch emulator without graphic desktop. Is it possible?
I find that it's possible start Android Emulator without graphic with this command:
$emulator -avd <avd_name> -no-window
Also you can add other commands to clean data on emulator
$emulator -avd <avd_name> -no-window -wipe-data