Ubuntu 13.10 Eclipse Creating Android AVD Not Working - android

I am using Ubuntu 13.10 on a 32 bit machine. Downloaded and installed Eclipse Kepler also 32 bit version in addition of JDK and JRE also 32 bit versions.
I downloaded latest Android SDK (API 19) but when I start Eclipse as user (not su) and try to create AVD, I get this error:
[2014-03-26 21:17:55 - SDK Manager] Error: null
and AVD is not created.
If I start Eclipse as su and attempt the same, I can create AVD but it will never start and I get:
Starting emulator for AVD 'NEX5'
PANIC: Could not open: NEX5
If I try to add already preset AVD "AVD_for_Nexus_5_by_Google, I get error:
/home/username/.android/avd/AVD_for_Nexus_5_by_Google.ini (Permission denied)
Please help. I am also new to Linux, so please provide some explanations.

Related

Intel HAXM - HAX version is too old

I can't start any x86 Android emulator on my laptop running Windows 7.
I have tried installing HAXM both through the extras folder in the Android SDK as well as directly downloading it from Intel's site and installing version 6.0.1 with no luck.
VT has been turned on in the Bios.
When I start an emulator I get the error
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX version (2) is too old (need at least 3).
If I run haxm_check.exe I get
VT support -- yes
NX support -- yes
Running sc query intelhaxm gives me
SERVICE_NAME: intelhaxm
TYPE : 1 KERNEL_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
I have VirtualBox installed, but VMVare is not running. I even stopped all the VMWare services. I don't believe it's any antivirus problem.
Googling HAX version (2) is too old (need at least 3) shows this source code https://github.com/ashishb/android_emulator/blob/master/android/emulation/CpuAccelerator.cpp but can't glean anything from it.
Any ideas?
The reason is that there was an old version of HAX driver (version 2) and the latest version of HAXM driver (file version 6.0.3, HAX driver version 3) is not installed successfully because it has some mismatch file name in its intelhaxm.inf file (see step 5) even if it says "install successfully" after you run the installer file on the machine.
Following are steps how did I fix the problem, step 1 to 3 are to remove the old driver and step 4 to 9 are to fix new version problem and install it, the <android-sdk> below should be your Android SDK directory.
Select Computer and Mouse right click menu, Properties->Driver Manager
Menu View->Show hidden devices, in the tree category Non-Plug and Play Drivers, find the IntelHaxm and uninstall the driver if found it.
Remove old intelhaxm driver folder: C:\Windows\System32\DRVSTORE\intelhaxm_579C88F702D572C10DF6C9F1668B2077995F4354
Go to <android-sdk>\extras\intel\Hardware_Accelerated_Execution_Manager and extract the install file intelhaxm-android.exe to folder intelhaxm-android using 7-zip or some other archive program
Go into the extracted folder intelhaxm-android and again, use 7-zip extract the hax64.msi to folder hax64
Go into folder hax64 and remove all .win7_64 suffix from the file names of the inf, sys, and cat files for your OS (win7 or vista), example for windows 7 64bit:
intelhaxm.inf.win7_64 rename -> intelhaxm.inf
intelhaxm.sys.win7_64 rename -> intelhaxm.sys
intelhaxm_x86.cat.win7_64 rename -> intelhaxm_x86.cat
The key step: rename file intelhaxm_x86.cat to IntelHaxm_x64.cat. (Because file reference CatalogFile.ntamd64=IntelHaxm_x64.cat in intelhaxm.inf is actully IntelHaxm_x64.cat instead of intelhaxm_x86.cat)
Open a command window with Administrator privilege and run sfc /SCANNOW and then reboot the machine
After windows up, open a command window with Administrator privilege in that <android-sdk>\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm-android\hax64 folder and run this command to install the driver HaxInst64.exe /i intelhaxm.inf 1, there should be no ERROR reported.
run this command to verify that it is working sc query intelhaxm, it should return with a state of 4 (Running)
Try to run AVD manager.exe in <android-sdk> to start your device simulator to check if works.
That's all.
Reference: FIX HAXM 1.1.1 on Windows 7 64bit
I had the same issue with Android SDK 24.0.0 rc3. Turned out it has nothing to do with HAXM but SDK Tools which don't get the correct version.
I then downloaded SDK command line tools 24.4.1 from https://developer.android.com/studio/index.html#downloads and copied all the files over my existing SDK (which was installed with Android Studio last week (android-studio-bundle-143.2915827-windows.exe)). Fun is, that Android Studio is not listing this update in the SDK Manager and says 24.0.0 rc3 is up-to-date.
After that launching an Emulator works with the SDKs default AVD Manager (located in the SDK root), but not from Android Studio. Android Studio still says my HAXM is out of date, it obviously does not recognize the correct version 6.0.1.
Please not that i'm not an Android Expert and have not yet tested any side-effects of the quick-and-dirty SDK Update. Maybe a fresh install of a seperate Android Studio and Android SDK is better.
Hope it resolves your issue as well.

Android emulator startup issues in VirtualBox running Ubuntu

Ubuntu: Desktop 14.04 (64-bit)
VirtualBox: Version 5.0.16 r105871
Android SDK: 24.4.1
I am trying to get Android Emulator running on Ubuntu 14 (Trusty Tahir).
I first downloaded and installed Ubuntu 14 in a new Virtualbox VM.
Downloaded and installed OpenJDK (apt-get openjdk-7-jdk).
Downloaded and untar-ed the android sdk archive.
Navigated to android-sdk-linux/tools/ and ran ./android
Android SDK manager, pulled SDK build revision 19 (for Android 4.x) and 23 (for Android 6).
After all the packages have been downloaded and installed, i launch Android SDK Manager once more, and click Tools > AVD Manager.
Created a new Nexus5 / Google Nexus AVD. Click 'Start'.
This is when I see the following errors:
Starting emulator for AVD 'AspectClass'
pci id for fd 5: 80ee:beef, driver (null)
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo
pci id for fd 8: 80ee:beef, driver (null)
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo
emulator: WARNING: Classic qemu does not support SMP. The hw.cpu.ncore option from your config file is ignored.
emulator: WARNING: The -scale flag is obsolete and will be ignored.
My research into a couple of these errors like the core dri/dri2 lead me to resources that indicate this might have something to do with 3D acceleration setting in Virtualbox. This does not apply to my case since I have 3D acceleration setting disabled.
Any help would be appreciated.
1) Make sure u have latest Android Studio 2.0, update java sdk version to 8
2) start emulator from android studio, if any issues. restart ubuntu,
3) go to boot option usually by pressing F12(or)F2, there enable fast virtual machine option and save and exit. Also enable the same option fast virtual mode in Virtual box VM if any.
4) After login start Emulator from Android Studio. Thats it
Android studio 2.0 has so many improvements http://developer.android.com/sdk/index.html

Intel HAXM installation Failed

I installed HAXM using Android SDK and it gave me an error of Not Installed while building. On maual installation, I get the following error. Can anyone help to figure out this?
Last login: Sun Jul 19 21:44:03 on ttys000
Tikas-MacBook-Pro:~ user$ /Users/user/Downloads/haxm-macosx_r05/HAXM\ installation ; exit;
2015-07-19 21:56:46.472 HAXM installation[779:65674] AuthorizationExecuteWithPrivileges failed with return: -60031
2015-07-19 21:56:46.472 HAXM installation[779:65674] HAXM installation failed!
logout
Saving session...completed.
[Process completed]
I just ran into this problem as well. I'm running Yosemite so the downgrading solution isn't pertinent. Eventually I decided to try running the silent_install.sh that's in the same dir as HAXM installation, and it worked.
Details
Open terminal window. (/Applications/Utilities/Terminal)
sudo ~/Library/Developer/Xamarin/android-sdk-macosx/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh
when prompted, enter sudo password.
wait a minute - says "Silent installation Pass!".
To verify success:
Open Google Android Virtual Device (AVD) manager.
Create a virtual machine with x86 or x86_64 as architecture.
Start that virtual machine - says "HAX is enabled", and Android Emulator window opens showing the emulated device.
NOTE: This answer is obsolete. Use adamvert's answer.
For anyone coming here, Preview Versions of Max OS X like El Capitan do not completely support all apps like the HAXM
Downgraded to Yosemite and it worked.
if the reason is that you upgraded to High Sierra 10.13 masOS
then : Do this on your own responsibility as I am not sure that it has no side effects
Download the HAXM-maxosx_v6_2_1
open the file silent_install.sh
go to the line :
for v in 10.8 10.9 10.10 10.11 10.12
add to it 10.13 if your os is High Sierra 10.13.xx
so it will be :
for v in 10.8 10.9 10.10 10.11 10.12 10.13
then run the silent_install.sh file as sudo
then it will pass :)

Eclipse cannot launch android emulator on Ubuntu 64-bit

When I try to launch an android emulator using AVD from Eclipse, it shows an error.
Failed to start emulator: Cannot run program "/home/mahdi/Desktop/adt-bundle-linux-x86_64-20130917/sdk//tools/emulator": error=2, No such file or directory
I think the problem is in the address. Because it has 2 slashes before "tools" folder.
//tools
I think it should be this or it has something to do with my operating system. I'm working on Ubuntu 13.10 64-bit.
change android sdk location from eclipse using window->prefrences->Android

64-bit Eclipse won't install .apk on Android emulator

On Windows 7 64-bit, running Eclipse 3.6 64-bit, JDK (jdk1.6.0_23) 64-bit and Android 2.3 (bitness?), running a program via Eclipse's Run|Run (Ctrl+F11) invokes the android emulator, but won't install .apk on the emulator (and certainly won't run it).
(update, answering #Computerish's question) All I am getting at Eclipse's Console is:
[2010-12-16 10:23:33 - HelloAndroid] ------------------------------
[2010-12-16 10:23:33 - HelloAndroid] Android Launch!
[2010-12-16 10:23:33 - HelloAndroid] adb is running normally.
[2010-12-16 10:23:33 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2010-12-16 10:23:33 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'AVD23'
[2010-12-16 10:23:33 - HelloAndroid] Launching a new emulator with Virtual Device 'AVD23'
This problem doesn't happen on Windows XP, running Eclipse 3.5.2 and Android 2.2 (all 32-bit).
I tried the solution suggested by the accepted answer in this thread but it didn't help. Task manager shows adb's Image Name as 'adb.exe *32'. Perhaps there is a mismatch between the bitness of Eclipse+JDK (64-bit) and the Android emulator/SDK?
Is Android development using 64-bit JDK not possible (yet)?
OK, here is the final answer (as of today): Android development, using 64-bit JDK only, is not possible (yet).
If you install the 64-bit Eclipse and install only the 32-bit JDK, Eclipse will refuse to start.
So, if you decided to install the 64-bit Eclipse, you need to install both the 64-bit JDK and the 32-bit JDK.
Thereafter, even the infamous installer_r08-windows.exe will run (and even invoke "SDK Manager.exe" automatically for you).
But 64-bit Eclipse still won't install .apk on Android emulator.
Conclusion: Google is absolutely correct in stating that Android is not supported (yet) under 64-bit Windows. The fact that some geniuses manages to do some magic to make their environment work is beyond me.
I suppose that 32-bit ADB waits for 32-bit JDK. Just install 32-bit JDK - and everything should work after that. i'm running Android SDK on 64 bit machine with both installed JDK's 32 and 64 bits - and everything is OK
I know this might be late, but I found a fix for it.
I'm running:
-64-bit Windows 7
-64-bit Java 1.7 SDK
-64-bit Eclipse for Java Developers + ADT Plugin
-64-bit Android SDK
So what I do is save my java source files, and run the application through Eclipse. I close the emulator after it fully loads to the home screen. Next, I go to my command prompt in Win7 and type emulator -verbose -avd youravdname. After you press enter, Eclipse will decide to upload and install the .apk file onto the emulator. Now you can see your new activities!
It's very cumbersome, and I wonder why this even works. I seriously spent hours wondering if I even installed everything correctly.
I had the same problem as the original poster and I'm also using Android SDK 2.3, Eclipse Helios, JDK 1.6.0_23 64-bit on Windows 7 Professional 64-bit.
However, once I've killed the adb.exe *32 process and then restarted eclipse and then tried running HelloAndroid app again, the emulator started successfully, the app *.apk was loaded and ran perfectly.
I didn't do anything else and I haven't installed JDK 32-bit on my machine.

Categories

Resources