(undetailed) Panic while creating Android Virtual Device (AVD) - android

Programming newbie, just getting started with all of this...
I have searched around, but I haven't found anything relevant to my problem
So here it is,
So I'm trying to build a simple hello world application for android, but I wanted to test run the AVD just to check things out.
But I get this problem:
(it just shows "PANIC: Cannot create AVD", no further info)
I have tried creating virtual devices based on 4.2 and 2.3.3, but none of these start up.
I have sdk up and running, no problem.
I also have all the files required (like the system images etc)
Eclipse 64-bit also runs fine (had some errors, but solved them using search)
Any help?
I run windows 7 64bit, 500gb hdd, 4gb ram, i3#2.4ghz
SDK, Java, Eclipse and all other tools are 64bit based.
Please help.

If the emulator takes up too much time to load or getting lags then you should try this. Called as Intel Virtualization Technology with HAXM.
I know this is not the answer of your question but that might be helpful for you. :) It can greatly increase emulator speed.
You can check : Here

If you are on windows, make sure that the amount of RAM the AVD will have access to is 512MB or less. It doesn't matter how much RAM your computer has, this is a bug.

What happens when you run the following from shell/command prompt? This should give you more information when the emulator is launching and should help diagnose the issue.
emulator -verbose -avd <name of emulator>

Okay, I seemed to have solved my problem
What I did was copy the default .android folder (it was auto generated in D:.android) to C:\Users\Administrator
Although this just works for one launch
For every subsequent avd launch, I had to re-copy the folder and replace only the edited files
Thanks everyone for trying to help!

You must establish (from security or from the advanced properties of your PC) the local variable ANDROID_SDK_HOME to your docs folder.

Related

Why emulator or Genymotion is unable to run my app properly?

I am using Genymotion for personal use to test my apps.However, the emulator opens up, displays everything fine.As soon as I run my app, it hangs or crashes.Same is happening when I use default android emulator.Also its taking quite too long to open my default emulator.I checked HAX on console and it is running fine.My system RAM is 8Gb.It appears to me some memory like issue but cannot figure it out exactly.
I had the same problem with ...
The solution that worked for me with x86 emulator was to update HAXM with the last version and to restart my computer.
http://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
may be this also works for you
The root cause was a missing video driver (the vanilla Microsoft one wasn't enough). I was working with a cobbled-together frankenbox and found it useful to follow the instructions on finding the right driver here:
http://support.amd.com/en-us/kb-articles/Pages/HowtoidentifythemodelofanATIgraphicscard.aspx#DID
I hope it helps

Developing Android Apps - Can't use any android emulator

I searched for days to find a way to start programming android applications however I failed every single try.
First I installed Android Studio on my Windows 7 computer, everything went fine.
After installation I tried to start a project and debug it and appeared my first error that you can see in the link below.
http://i.stack.imgur.com/q9BlJ.png
Then I searched here on stackoverflow and I searched on every single website that is related to this error. What did I learn?
I need to install an Intel package on SDK Manager
I also need to install an executable present on appdata android studio directory
I MUST disable or uninstall hyper-v to install the exe file I spoke on the step before
I searched on how to get this hyper-v out of my computer and I found many ways however when I tried this ways and then tried to install the exe file, it shows this message:
http://i.stack.imgur.com/gQjON.png
I don't know if my computer has hyper-v, the only way I can't do is going to my BIOS and disable it because I don't know the keys I need to press to show my computer BIOS (on the startup it doesn't show any label about the BIOS keys).
My computer model is Sony VAIO VGN-NS11Z_S, if someone knows the BIOS keys please tell me.
I can't use the emulator to try out my app so I gave up from Android Studio and I started with Eclipse and the ADT Plugin.
My problem is still the same, I don't if it is because hyper-v but the android emulator don't work.
Everything is fine but I can't test my app so I can't develop them too...
I really appreciate any help, I want to create Android apps so much, please give me an alternative or a way to fix my problems.
Thank you
You can try using Genymotion. It also needs some sort of hardware acceleration but give it a try.
It can't be that hard to find out the keystroke for your BIOS (EDIT: okay, it can be obviously for some devices). Just google for "your mainboard manufacturer + bios". I found this thread, one post even mentions Hyper-V.
Android Studio and Eclipse have nothing to do with the Emulator. The Emulator is part of the Android SDK which is identical for both IDEs. Throw away Eclipse (at least for Android).
As a last resort, run the Emulator with an ARM image instead of the i86 one, I think it runs without HAX and without hardware acceleration. It's damn slow though.
If you want to do serious Android development, there's no way around a real device. There's plenty of cheap options. That's just a little heads up though, I understand though that you still need an emulator for development.
Here's an interesting link on Sony's website about a BIOS update that may help (disclaimer: BIOS updates are not guaranteed to be safe, install at your own risk and make sure it's the exact right one for your computer):
http://www.sony.co.uk/support/en/content/cnt-dwnl/prd-comp/EP0000208387_4486/VGN-NS11Z
But also within that link it mentions to press F2 to get into your BIOS. Does that work for you?

Android studio 1.x AVD not running?

I'm a newbie android developer ,since i upgraded to Andoid Studio 1.x from beta ,things became a lot easy , creating the AVD and managing SDK is managed better by the IDE now ,
I used the Default Nexus 5 config to setup an AVD,however can you please tell me how to safely turn it off ,I cant find any poweroff button , i have Intel HAXM set up and working fine, I got an error saying AVD instance aldready running etc asking me to delete the avd from user/android/avd/... which i did ,
WHen i created it i can run it just once, when i close and reopen studio and try to run again i get the following message
AVD Nexus_5_API_21 is already running.
If that is not the case, delete the files at
C:\Users\S****\.android\avd/Nexus_5_API_21.avd/*.lock
and try again
And what system image to use for the AVD, whats the difference between the ARM ,ATOM 86,ATOM 64 and googdle API images for the same android version, i use a windows 8.1 PC 64Bit running on a vt-x suported intel core i5 , 4200 u processor , which image should i use ,
Please Note i couldnt find solutons elsewhere and i doubt its an offtopic question as its about setting up a programming tool.
Btw the task manager shows a 32 bit emulator running
Thanks!
Here you Are :
when you click on turn on/off button emulator will be start/finish , also Remember after start emulator for first time you don't need to reOpen it!
Delete all files and directories with extetion .Lock at C:\Users\user_name.android\avd\emulator_name.avd\files.Lock and try Again.
Go to Tools>>Android>>Enable ADB Integration select this, It worked for me.
make sure sdk and avd manager added to your IDE correctly.
answer of your second question is,when you play your app in IDE a emulator will be run and on emulator toolbox you can turn off or turn on your emulator and also you can see your app running or not
I meet this situation today, but the file *.lock was deleted (not by me) when i run this emulater failed with error tips like
AVD Nexus_5_API_21 is already running.
If that is not the case, delete the files at
C:\Users\S****.android\avd/Nexus_5_API_21.avd/*.lock
so in the end, i duplicated this emulator and located the copy emulator's location and find the .*lock file and then i deleted it and it worked.

How to run Android-x86 4.2 iso on VM VirtualBox?

I want to use Android-x86 to test and debug my App.I tried other versions of Android-x86 before successfully,but there is an erroe in about android-x86-4.2.So I ask my question here because it may be happen for others:
I installed oracle VM virtualBox on Win7 32-Bit,then I downloaded android-x86-4.2-20121225.iso from Android-x86 - Porting Android to x86.After I installed Android x86-4.2 on VirtualBox from iso and creating fake SD Card for it,I tried to run it,but when I started it I saw these lines in console:
Detecting Android-x86... found at /dev/sda1
ANDROID root#x86:/ #
And no thing else,even I waited more than 20 minutes and nothing happen!I tried that some times but result is the same.How I can solve this problem?
I asked same question in superuser and I found the way to start it. The correct answer is:
From the install/live CD, you just need to change the value of "androidboot.hardware" parameter
in the grub command from "Android_x86" to "x86". You can do this by
pressing "Tab" in the boot menu or by editing "isolinux.cfg" file on
the installation ISO Image.
If you installed Android-x86 on hard drive,you have to select desired boot option and press e to edit grub command.
I don't know about the project Android X86 - Porting Android to X86. I see in the web, this emulator has a complex installation. I think, if you want to try a fast Android emulator and install easily, debug faster, you can try project AndroVM. It is easy to install it to Virtual Box by downloading the image file and import to Virtual Box .
For what I understand of Linux (which it isn't a lot, but enough I'd say) you're logged in into the system and waiting for you to type some command. If I'm right, you should launch the X server but on an Android environment I don't really know how.
UPDATE:
For what I read here, it's just what I said: it boots and after that it prompts the command line. Two solutions that appear on the link are:
Type start.
Select VESA option before the boot process (I can't help you out in this one, because I don't have the .ISO to try right now).
Please, check them.
The best way to run android x86 on pc is to format a partition in ext3 format.Then install android on it.It will allow androidx86 to run easily.
I have HP430 Laptop with win 7. I had the same problem. But I figured out the solution.
While booting the computer with win7 I entered BIOS menu. There was a option to optimize pc for virtualization.I selected it. After that every thing ran smooth.
Later I noticed in virtual box that, in system settings the acceleration type was VT-x AMD, Nested Paging,PAE/NX. This was different before optimization.
Hope this gives some idea.

Unbearably slow android emulator -- is there a fix?

I know that the topic was discussed here last year, but I am hoping that someone has since found a fix. The emulator is simply not working for me anymore. It took 15 minutes or so to load hello world a few days ago, and now I can't get it to load a simple MapsDemo from the api samples no matter how long I wait.
I'm using eclipse with the android plugin (sdk and avd manager). My pc is 2.31 GHz quadcore with 8GB ram and windows 7 x64. Nothing is being logged in LogCat apparently.
Are there any alternatives or certain fixes I can try before buying a phone? I'd just upgrade my phone to an HTC Incredible and debug from the phone, but Verizon won't have any for at least a month and I'd really like to have my app out by then.
The best advice I've received is to use to target an older platform and a lower resolution. The emulator for Android 1.5 at HVGA is significantly faster to load than 3.1 at tablet resolution.
If you are running an emulator for a newer Android version, and want to see what it is doing while loading, you can watch on 'adb logcat'. It at least gives some better feedback than the word "Android" with a light shining across it!
Delete all your AVDs & re-install the SDK in a new directory. This should clear out any lurking config settings or AVD based issues which could be causing the slowdown.
Also try shutting down any virus/spyware scanner you may have running because you can then see if your AV app is trying to scan the AVD and or SD card images which could slow things down.
(btw, I'm running the emulator on a Quad Core Q6600 with 4gb RAM & Win 7 x64 and it starts in less than 1 min, so I doubt it's a compatibility issue).
I usually start it then after I see the "ANDROID" screen close it and restart it and it works and starts up a lot faster the second time.
I have started using ubuntu v11 (with dual boot) ,emulator is now starting within 40sec and working without any errors ,which i have encountered in windows 7 and performance is also good.
I just had the very same problem today, after I received the advise, to create a 400MiB SD Card on my AVD. I did so, but nothing worked anymore. I waited half an hour for my App to compile, but nothing happened even though the LogCat was still runnĂ­ng ... So I came in here to find a solution and I did!
Here`s what speeded the whole thing up again:
I went to the AVD Manager (Window > AVD Manager in Eclipse)
Above the AVDs you can see the path where everything is stored that is created by the machine
So I went to that folder of the path and it was filled with previously compiled stuff
So I deleted it and voila, my App is run within a minute again!
P.S. It might be the case, that you won`t find the last folders described in the path, because they are hidden. Just type in that path, and they will be there: The hidden folders looked like this: .android\avd
Just type it in manually and erase all that stuff in there.
Using SDK Manager download and Install Intel x86 Emulator Accelerator(After downloading this SDK Package can find executable file at path "SDK_LOCATION"\extras\intel\Hardware_Accelerated_Execution_Manager Install it) and also Intel x86 Atom System Image packages.
Then create a new AVD with CPU/ABI as Intel Atom(x86), and Check Use GPU Host. Done!

Categories

Resources