Android AVD not starting - android-emulator

I try to set up my first Android AVD by starting it from Eclipse via Android AVD Manager.
Now I created a device named "EclipeTestDevice" with the following parameters:
- Device: Nexus 4
- Target: Android 2.3.3
- CPU: Intel Atom (x86) > of course I installed the "Intel x86 Emulator Accelerator" with the Android SDK-Manager
- Skin: HVGA
- Memory Options: RAM 1907, VM Heap 64 (this was a proposal by the device)
When I start the Device the new window appears, but only the text "android" (the android logo) is displayed and the device does not continue (I waited for about 10 mins).
I also tried other devices, but no one works.
Does anyone have a hint for me?
Thanks!

Can you try the configuration as shown in the figure(please use device and ABI of your choice).

Related

Seeing "Couldn't statvfs() path: No such file or directory" when running Android emulator on Ubuntu 18.04

When running the emulator from Android Studio 3.3.2 on Ubuntu 18.04.2 I'm getting the dreaded
Emulator: Couldn't statvfs() path: No such file or directory
message in the Event Log. The emulator seems to be running ok.
I've already installed the 32 bit libraries that are required to run Android Studio as per https://developer.android.com/studio/install#linux. My laptop is a Dell XPS 13 9380 with an Intel 915 chipset so the recommendations I found to install nVidia drivers do not apply.
Also tried switching between hardware and software rendering for the emulator, both with the same effect.
This was my video cards driver, Ive updated that for the vendor drivers and works wonderfully

Android emulator on Windows Hypervisor Platform error on Hyper V enabled system

When I started emulator on my WIN 10 PRO with
Emulator -avd Android_Accelerated_X86_Oreo -partition-size 512 -feature WindowsHypervisorPlatform
i've got the error:
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Windows Hypervisor Platform (WHPX) is properly installed and usable.
#little-monkey
Unfortunately its no way to set it enabled becouse I dont have this option in menu like: properly options in WIN 10
I'd tried scf and dims to resolve error in Windows Update packages but it was useless. Thank you for help in advance!!!!

Mac and "PANIC: Missing emulator engine program for 'arm' CPU."

I am attempting to run an AVD I have created for API 16 on a Galaxy Nexus:
emulator #Galaxy_Nexus_Jelly_Bean_API_16
which gives the error
PANIC: Missing emulator engine program for 'arm' CPU.
Attempting to start it by pressing the play button from the AVD Manager inside Android Studio bounces something briefly in the tool dock, but it quickly vanishes and nothing shows up and there are no obvious error messages.
I have looked through other posts with similar problems. Most cite Avast on Windows as causing the issue. I am running on a Mac. I do not have Avast installed.
The AVD has the following configuration:
Name: Galaxy_Nexus_Jelly_Bean_API_16
CPU/ABI: Google APIs ARM (armeabi-v7a)
Path: /Users/prisoner/.android/avd/Galaxy_Nexus_API_16.avd
Target: google_apis [Google APIs] (API level 16)
Skin: galaxy_nexus
SD Card: 100 MB
hw.dPad: no
hw.lcd.height: 1280
runtime.network.speed: full
hw.accelerometer: yes
hw.device.name: Galaxy Nexus
vm.heapSize: 80
skin.dynamic: yes
hw.device.manufacturer: Google
hw.lcd.width: 720
hw.gps: yes
hw.initialOrientation: Portrait
image.androidVersion.api: 16
hw.audioInput: yes
image.sysdir.1: add-ons/addon-google_apis-google-16/images/armeabi-v7a/
hw.cpu.model: cortex-a8
tag.id: google_apis
showDeviceFrame: yes
hw.camera.back: virtualscene
hw.mainKeys: no
AvdId: Galaxy_Nexus_Jelly_Bean_API_16
hw.camera.front: emulated
hw.lcd.density: 320
avd.ini.displayname: Galaxy Nexus Jelly Bean API 16
hw.arc: false
hw.gpu.mode: auto
hw.device.hash2: MD5:5c288d27461585ecc73a535555e7cf61
hw.ramSize: 1024
hw.trackBall: no
PlayStore.enabled: false
fastboot.forceColdBoot: no
hw.battery: yes
hw.cpu.ncore: 4
hw.sdCard: no
tag.display: Google APIs
runtime.network.latency: none
hw.keyboard: yes
hw.sensors.proximity: yes
disk.dataPartition.size: 800M
hw.sensors.orientation: yes
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes
Android Studio environment:
Android Studio 3.1.4
Build #AI-173.4907809, built on July 23, 2018
JRE: 1.8.0_152-release-1024-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6
I have installed everything for this version of the SDK available in the SDK Manager:
I have the latest version of the emulator installed. I've tried uninstalling and re-installing it.
The ANDROID_HOME environment variable appears to be correctly set (it matches the Android SDK location in the SDK Manager. The emulator program appears to be the one under this home environment as well:
Mulan:~ prisoner$ echo $ANDROID_HOME
/Users/prisoner/Library/Android/sdk
Mulan:~ prisoner$ which emulator
/Users/prisoner/Library/Android/sdk/tools/emulator
As far as I can tell, the emulator and the architecture-specific emulators are also under ANDROID_HOME:
I'm at a loss about where else to look, either for error messages or the emulator that is there, but can't be found by the system, or how else to address the problem.
Update 1: Specify path explicitly.
Trying to specify the paths explicitly doesn't work either:
Mulan:~ prisoner$ /Users/prisoner/Library/Android/sdk/tools/emulator #Galaxy_Nexus_Jelly_Bean_API_16
PANIC: Missing emulator engine program for 'arm' CPU.
Mulan:~ prisoner$ /Users/prisoner/Library/Android/sdk/emulator/emulator #Galaxy_Nexus_Jelly_Bean_API_16
emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-qemu" is in the same location as your system image.
emulator: ERROR: ANDROID_SDK_ROOT is undefined
Sure enough, ANDROID_SDK_ROOT isn't defined. Defining it to the same thing as ANDROID_HOME does the following:
Mulan:~ prisoner$ export ANDROID_SDK_ROOT="$ANDROID_HOME"
Mulan:~ prisoner$ /Users/prisoner/Library/Android/sdk/emulator/emulator #Galaxy_Nexus_Jelly_Bean_API_16
emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-qemu" is in the same location as your system image.
emulator: ERROR: ANDROID_SDK_ROOT is defined (/Users/prisoner/Library/Android/sdk) but cannot find kernel file in /Users/prisoner/Library/Android/sdk/system-images/ sub directories
Looking underneath the system-images directory, we see a directory for each API platform:
Mulan:~ prisoner$ ls ~/Library/Android/sdk/system-images/
android-16 android-19 android-23 android-26
android-17 android-21 android-24 android-27
android-18 android-22 android-25 android-28
Looking just under the android-16 directory, we have
./default
./default/armeabi-v7a
./default/armeabi-v7a/build.prop
./default/armeabi-v7a/kernel-qemu
./default/armeabi-v7a/NOTICE.txt
./default/armeabi-v7a/package.xml
./default/armeabi-v7a/ramdisk.img
./default/armeabi-v7a/source.properties
./default/armeabi-v7a/system.img
./default/armeabi-v7a/userdata.img
./default/mips
./default/mips/build.prop
./default/mips/kernel-qemu
./default/mips/NOTICE.txt
./default/mips/package.xml
./default/mips/ramdisk.img
./default/mips/source.properties
./default/mips/system.img
./default/mips/userdata.img
./default/x86
./default/x86/build.prop
./default/x86/kernel-qemu
./default/x86/kernel-ranchu
./default/x86/NOTICE.txt
./default/x86/package.xml
./default/x86/ramdisk.img
./default/x86/source.properties
./default/x86/system.img
./default/x86/userdata.img
./google_apis
./google_apis/x86
./google_apis/x86/advancedFeatures.ini
./google_apis/x86/build.prop
./google_apis/x86/kernel-qemu
./google_apis/x86/kernel-ranchu
./google_apis/x86/NOTICE.txt
./google_apis/x86/package.xml
./google_apis/x86/ramdisk.img
./google_apis/x86/source.properties
./google_apis/x86/system.img
./google_apis/x86/userdata.img
Just tried and verified on my Mac, to solve this problem, you need to specify the -kernel path manually. i.e.
$ ~/Library/Android/sdk/emulator/emulator #Galaxy_Nexus_Jelly_Bean_API_16 -kernel ~/Library/Android/sdk/system-images/android-16/default/armeabi-v7a/kernel-qemu
Some references for you:
Emulator error: This AVD's configuration is missing a kernel file
https://developer.android.com/studio/run/emulator-commandline
--- Edit ---
To avoid typing the -kernel argument every time, you can also copy the ~/Library/Android/sdk/system-images/android-16/default/armeabi-v7a/kernel-qemu file to ~/Library/Android/sdk/add-ons/addon-google_apis-google-16/images/armeabi-v7a.
Maybe it is the emulator tool path issue. Try to specify the full path of your emulator path.
Try the answer from here. Windows emulator.exe PANIC: Missing emulator engine program for 'x86' CPU
[Partial answer - to a related issue on the IDE]
I have faced this problem also. My Android Studio couldn't even start the emulator, coming up with an error like "Emulator: Process finished with exit code 1". The fix there was to install/update the relevant system images under SDK Manager -> SDK Platforms (tab) -> Click "Show Package Details" and then "Apply".
However, this doesn't seem to make the CLI command emulator -avd <avd name> run, instead I see the PANIC error, but apparently it's related to the migration of the emulator from the SDK path /tools to /emulator

Windows 7 Android AVD emulator crashes on launch

I have installed the latest version of ADT (Android Developer Tools Build: v21.1.0-569685) and eclipse 3.8. I followed the instructions (http://developer.android.com/training/basics/firstapp/running-app.html#Emulator) to start the Hello World example but the AVD crashes on start, with no error messages in the console.
I tried that and even lower RAM to 40M but still no luck. I tried all kinds of combinations of RAM and resolution (lowered resolution to 480 x 800 hdpi), camera settings, enabling "Run as Admin". It just crashes w/ a message "emulator-arm.exe has stopped working". The console doesn't show any error message.
I have tried many solutions that came up on Google but no dice; plus a lot of them are very old posts. Please help!
Please see screen shot of my configurations and crash message here:
http://imgur.com/a/mvogh
My machine:
Win 7 64
RAM: 8GB
Processor: AMD Phenom(tm) II X6
Graphics card: ATI Radeon HD 5450
This is what I see when it crashes:
emulator-arm.exe has stopped working
problem details:
Problem signature:
Problem Event Name: APPCRASH
Application Name: emulator-arm.exe
Application Version: 0.0.0.0
Application Timestamp: 5111a505
Fault Module Name: atioglxx.dll
Fault Module Version: 6.14.10.9232
Fault Module Timestamp: 4b208022
Exception Code: c0000005
Exception Offset: 0000b212
OS Version: 6.1.7601.2.1.0.768.3
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
I tried running "adb logcat" and screen said "waiting for device". I started Eclipse and started AVD from AVD manager. It crashed again but "adb logcat" still said waiting for device.
Is it possibly a hardware issue?
Thanks.
I installed latest driver/software from ATI and everything worked. Thanks.
If you need to debug any given Android instance, from both real devices or from the AVDs, use adb logcat, other than that, your question it's really without any specific detail that can help with this.

My Emulator will not "load" the Hello World tutorial program properly

I am a total beginner with Android. I followed the instructions on the Android Developer site for loading all of the necessary software. However, I tried the Hello World Tutorial and I cannot get the code to install on the emulator properly. I am using Eclipse SDK ver. 3.6.2. and running the code with Android 3.1 API 12 emulator. The emulator does not crash and as you will be able to see from the sample from my Eclipse console window output below, I have waited a sufficient amount of time for the Emulator to start. Here is my source code
package com.example.helloandroid;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class HelloAndroid extends Activity {
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);
}
}
Here is the Eclipse console output:
[2011-05-13 20:12:53 - HelloAndroid] ------------------------------
[2011-05-13 20:12:53 - HelloAndroid] Android Launch!
[2011-05-13 20:12:53 - HelloAndroid] adb is running normally.
[2011-05-13 20:12:54 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2011-05-13 20:12:54 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'Android-3-1'
[2011-05-13 20:12:54 - HelloAndroid] Launching a new emulator with Virtual Device 'Android -3-1'
[2011-05-13 20:13:14 - HelloAndroid] New emulator found: emulator-5554
[2011-05-13 20:13:14 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
**Two lines below are in red**
[2011-05-13 20:18:01 - HelloAndroid] WARNING: Application does not specify an API level requirement!
[2011-05-13 20:18:01 - HelloAndroid] Device API version is 12 (Android 3.1)
[2011-05-13 20:18:01 - HelloAndroid] HOME is up on device 'emulator-5554'
[2011-05-13 20:18:01 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554'
[2011-05-13 20:18:01 - HelloAndroid] Installing HelloAndroid.apk...
**Below appears in red**
[2011-05-13 20:21:23 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554!
[2011-05-13 20:21:23 - HelloAndroid] (null)
[2011-05-13 20:21:28 - HelloAndroid] Launch canceled!
Any help is greatly appreciated. I can't really start learning how to make Android programs until I get this issue resolved.c
Thanks!
Eclipse 3.6 and Android 3.1 API 12 works fine. However, please make the following change.
In Eclipse, Window > Preferences > Android > DDMS > ADB Connection Timeout - Change this from 5000 to a higher value - say 20000.
Close Eclipse and open up again and run.
You should get past the "Launch Failed" issue.
Next, if you get past this and then you get a message saying, "Success....ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=....", but on the emulator screen you just see a lock icon, please understand that the emulator is similar to the phone. Drag the lock (to unlock your simulated phone) and then you should be able to see your "Hello Android" message.
It wont work for revision 11 and revison 12 i think maybe going to revison 10 platform may help
I was also encountered error when followed instructions, so i ran "adb logcat" which showed that it is not able to find the class.
In the instructions(tutorial) - :
It has been said that during (create new project or class)application name as Hello World and activity name became HelloWorldActivity.
So if you maintain both CreateActivity name and application name both same, then it might work.
I have increased the AVD RAM size to 1024 and VM application to 36 0r 48 or 24.
Your emulator does not appear to be fully loaded. According to that stack trace when your hello world project tries to access the emulator the object it expects to find is (null).
On a separate issue I would use API 8 for phone dev. (2.2 or 2.3).
thenewboston.com has a good set of tutorials for setting up your android development environment.