VM Ubuntu: Android Emulator won't start from Eclipse - android

I have created a VM Ubuntu 14.04 using Vmware Player, and I've installed the ADT environment for Android Development.
I have created a new Android emulator using the shortcuts present in Eclipse; when I tried to start emulator I got the following known error:
Starting emulator for AVD 'AVD_for_Nexus_5_by_Google'
ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them
you will have to do at least one of the following:
- Use the '-force-32bit' option when invoking 'emulator'.
- Set ANDROID_EMULATOR_FORCE_32BIT to 'true' in your environment.
Either one will allow you to use the 32-bit binaries, but please be
aware that these will disappear in a future Android SDK release.
Consider moving to a 64-bit Linux system before that happens.
I fixed it in both ways: putting a variable in my .bashrc:
export ANDROID_EMULATOR_FORCE_32BIT=true
and also setting the emulator option in the Eclipse preference dialog:
Nevertheless, every time I try to start the emulator I got always the same error.
The wierd thing is that if I try to start the emulator from a bash window, it starts normally.
This could have been a boring workaround, but I would have been happy anyway. The problem is that when I try to deploy an application from Eclipse, the emulator started in this way is shown as "Offline" and I cannot run any application on it. Possibly I can upload the apk into the emulator from the command line, but debugging the app would become a bit harder.
Has anyone got the same problem or does know how to fix it?

I found out a partial solution for connecting eclipse to the running emulator started by command line: the emulator MUST be started with no snapshots.
Indeed, if I start the emulator without snaspshots, it become "online" in DDMS, and I can finally use it.
Although this could be a bit annoying, because starting the emulator from scratch every time it takes a long time, at least I have a way to use it.
On the other hand, I don't know exactly the reason of this behavior, if someone has an answer it will be appreciated.
Moreover, I still do not have idea why I'm not able to start the emulator from Eclipse.

Related

How can i fix android studio emulator run problem?

I have some trouble about android studio. if anybody know this program, please read description of my problem.
I created empty activity project android 5.0(lolipop) and just click run by emulator. I already tried different kind of devices, but the error is the same. My friends have no problem like that.
please tell me what to do.screenshot of emulator error message and photo of log error
updated event log after trying reinstall emulator devices
Do you have Bandicam installed like it's suggesting? It's complaining about your Vulkan drivers ( you could update those) and Bandicam messing with them (you could uninstall that).
Alternatively you can open your AVD Manager, edit the AVD you're using, and set Emulated Performance: Graphics to Software (can't do it on every image for some reason - my API 29 Pixel 3 image won't let me change it, my API 30 Pixel 3XL image will). It'll run worse, but it'll run (well it should anyway)
If you use the flatpak of android studio on linux, run "flatpak update" and that should resolve your issues.
If you don't use the flatpak on linux, try restarting your machine and if that doesn't work, do a clean reinstall of your graphics driver.
Don't know why people keep trying to recommend software rendering, it's horrible and not at all practical, it's a barely working workaround not a solution.

Unable to launch emulator on Android Studio: EventQueue.isDispatchThread()=false, then unable to locate adb

When trying to run my device emulator on Android Studio, a pop-up appears:
Previously, I had gotten the error 'Unable to locate adb', but after replacing the default platform_tools folder with the
official version, this pop-up now replaced the last one. I don't think this is a problem with my installation, as I've uninstalled and reinstalled Android Studio and the flutter-sdk several times, each attempt met with the unable to locate adb error, then this one. Could it be the way I'm unzipping a certain file? I'm grasping at straws here.
Are there any fixes for this? To be honest, I'm not even sure where to start. I haven't seen any other page that describes getting this error while trying to launch an emulator.
Thank you for your time!
Edit: Error description in plain-text:
EventQueue.isDispatchThread()=false Toolkit.getEventQueue()=com.intellij.ide.IdeEventQueue#2c5cc720
Current thread: Thread[ApplicationImpl pooled thread 4,4,Idea Thread Group] 1175604479
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,Idea Thread Group] 1657237134
I've tried to create a new device and wipe the data on my current one, but that just results in the unable to locate adb pop-up again (I don't have an antivirus like Avaast enabled by the way), and I am absolutely certain that adb.exe is in my file-path (C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe). I have uninstalled and reinstalled platform-tools from the SDK-manager multiple times, each instance being met with this same error. I cannot run any flutter program, on any emulator. I have not yet tried with a regular Android Studio project. Any ideas?
so, i'm still not sure why the EventQueue error is showing, but what I do know is that the unable to locate adb is a negligible pop-up if you know for certain that adb.exe is in your file-directory. My issue was that I didn't have enough memory to run the emulator on my machine, so be sure to have plenty of room while developing apps (~11 gigs while using Android Studio and flutter-sdk)! That's all, it certainly was a strange experience working through it.
In my case, what helped, was to just restart an emulator.

Android Studio: Unable to obtain result of 'adb version'

I am trying to start development on an Android app using Android Studio, but whenever I try to run the app I get the error Unable to obtain result of 'adb version' I have tried uninstalling and reinstalling Android Studio multiple times on different computers (both running Windows 10) and every time I get the same error. I have researched the problem and have been unable to find a consistent solution. (or one that actually works) I am very new to Android development and am slightly at a loss as to what to do; any help on solving this problem would be much appreciated.
Found the solution thanks to #user3109468, Android Studio had the directory for the Android SDK wrong. In File>Project Structure make sure the directory for the SDK is correct; mine was C:\Users\[user]\AppData\Local\Android\sdk (Google had given sdk a capital "S" for some reason...)
Uncheck: enable adb integration from Tools>Android and re-enable it.
This worked for me.
This might be because of windows virtual memory problem.
Try running adb from command line. something like
adb version BTW, platform-tools would be located in
c:\Users\<your userid>\AppData\Local\Android\sdk\platform-tools
How much it takes from you firing a command and actually gets an answer ?
if it takes more than 5 seconds, then android studio times out waiting for an answer and throws up an error.
How to fix ?
close all your program ( Process ? )
and go to control panel -> System->advance System settings-> Advanced tab->performance->settings->Advance->Virtual memory change
Try to reduce virtual memory size. Fr e.g. If it's 4096Mb make it 2048Mb ( both initial and maximum) It will ask to restart, so restart and get yourself a cup of coffee, because it will take a while. Then, once your system is up , try running adb version. Does it run quickly ? If yes, problem is fixed. Go back to virtual memory and increase it's size to the one before, and that's it.
BTW, I noticed in my case that simple hello world program was taking 20 sec to execute on my machine before fixing virtual memory problem.
Make sure Android SDK location and Android NDK location is correct.
Go to File -> Project Structure.
Set the Android SDK location and Android NDK location.

Android Emulator doesnt load the App(Crash Report)

I am having a problem in running my app in Emulator. There are no errors or warnings in the code, its running perfect in device, but when it comes to emulator, it always crashes and the error message would be like this
[2012-01-16 16:13:55 - MyApp] Failed to install MyApp.apk on device 'emulator-5554!
[2012-01-16 16:13:55 - MyApp] (null)
[2012-01-16 16:13:55 - MyApp] Launch canceled!
I have tried the following things:
Run configurations > Target > Wipe user data > Run
Uninstalling the app and run it again
Restarting the emulator
adb kill-server && adb start-server
Creating a new Emulator and running the app in it
Restarting ADB
Restarting Eclipse
Starting the Eclipse after the emulator is launched completely
Increasing the ADB connection time-out to 1000
Restarting the System
Deleted the emulators and created new emulators and run in it after they are completely loaded
I don't know what else should I do. Sometimes if I run in a new Emulator the app runs for the first time and if I run it again after sometime, its the same crash report. I am not able to understand what is the problem.
Can anyone please suggest me what should I do now and where is the problem?
The Emulator used to work well before. This problem started a few days back.
Any help will be appreciated. Thanks All.
Have you defined all of your Activities correctly and completely in AndroidManifest.xml?
Can you paste the definition of your AndroidManifest.xml here?
Try that.
More possibilities:
Real refresh of AVD. It is funny, but Eclipse remembers your emulator. And if you turn it off and on it will be the same old good (or bad) one. You could reinstall all Eclipse for a real refresh. Or use a shorter, but tricky way. Change the max VM app heap size of the emulator. (Android SDK and AVD manager - Virtual device - Edit) Create it. Now you have a brand new emulator. Funny, isn't it? Now you can change the heap size back, if you wish.
Really, I think, you can maybe change any emulator parameter for the effect. Only I stumbled upon it by heap size and stuck to do it this way.
Try to repair the path.
Set the path environment variable with the path of "platform-tools" and "tools" found in the "sdk-home".
On windows(vista):- 1.Go to "Control Panel\System". 2.Select "Advanced System Settings". 3.Select the "Environment variable". 4.Set the path environment variable under the system variable with values "SDKHOME\platform-tools;SDKHOME\tools". Where "SDKHOME" is the home folder of Android sdk.
Check,if APK version of the application sits with that of the
emulator.
Try to set a longer waiting time for launch.
Increase AVD heap and SD card
Maybe, it would be good to try to recall all the changes that were done before the problem appeared?
Oh! One more: Don't you have by accident simultaneously launched emulator and connected device? If you have the same application (ssame name) on both, they could conflict in a similar way! They simply won't let each other to be launched
If nothing helps:
I was already so tired of Eclipse errors, that I have installed the IntelliJ Idea IDE, too. Now, if for the same project applications behave idself differently on both IDES, the problem is in IDE setting or emulator. If the problem is the same on both, I look for a bug in my application or the external device. Once I had a problem in OS - had to restart Linux. But in your case it is the most probable, that the problem is in AVD. I am afraid, the only variant you haven't try yet is to reinstall Eclipse. Uninstall, remove everything from the application except code, layouts and Manifest, and install Eclipse anew. Or make other Eclipse installation, with its own workshop. You can try the last version. But if the problem is in some setting, you can set it again...
Sorry, I have put here all methods I used or found.
here you can find a similar problem and the proposed accepted solution:
Honeycomb preview - can not install my app on emulator under Eclipse
I hope this helps.
This could be due to Antivirus/Firewall software installed on your PC. Have you tried to disable it?
You should also ensure that versions of Eclipse, ADT and Android SDK are up-to-date and compatible. Have you tried to contact update sites in Eclipse and in Android SDK manager? By the way, what versions of the that software do you use?
Let's go step by step.....
1º- You should try to start the emulator without the application installed.
2º- Once it is running correctly, try to install another .apk(like for example one default one....)
3º- Now, try to run the .apk. If the problem continues, try to delete the current VM and install another new one.
Can you see Emulator in "adb devices"? If yes, can you install any .apk?
If not - you have propablly something wrong with sdk
As some people have answered already partly. Make sure of a couple things which are very important specially because of the latest Android tools releases which requires.
The latest eclipse version. Yes, very very important:
http://www.eclipse.org/downloads/packages/eclipse-classic-371/indigosr1
Make sure you update the Android ADT plugin for eclipse:
http://developer.android.com/sdk/eclipse-adt.html#installing
I've encountered similar issue and that was what has helped. Restart your computer too possible?...
Use command prompt to start emulator
emulator.exe -avd google2.2 -scale 0.7 -dns-server 8.8.8.8
it may help you.
try cleaning your project or deleting the .APK file in the bin directory of your project.

Android 2.1: can't run HelloWorld on the Emulator

I'm new in Android. I'm starting with HelloWorld program, but I can't run it on the Emulator. I'm using newest version of Eclipse and Android SDK. I also set up development environment as follows instructions on http://developer.android.com/index.html.
Does anybody have advice for me?
OMG!!! My problem is nothing :)) i must wait the emulator in a long time after that my program will be loaded. I watched a tutorial clip on YOUTUBE and i saw the boot screen of the emulator is as like as the emulator in my machine. Thanks all for help!
Do you get any errors?
if this is your first app, its probably to do with setup and enviroment. Whats your system spec?
I found running the install process - you have to make sure you follow the installation process in a good sequence. Eclipse, android platform. Java enviroment then ADT plugin.
the AVD Manager updater should have taken a long time to get everything you need when you run it.
If it failed - There is a little check box in the settings of the AVD manager that allows you to force download the HTTP -
But as long as you've got the lot, and your building a 2.1 file.
Also, the first time you run the emulator, it'll sit quiet for a worrying amount of time. Just make tea, watch TV - google kayden kross and it'll be fine.
Make sure you create an emulator image (AVD) or you won't be able to run it.
also for other newbies , just right click the project and say "debug as -> android" .

Categories

Resources