Waiting for HOME ('android.process.acore') to be launched - android-emulator

I tried working the Hello World application and the emulator freezes after it flashes the Android start screen. The home page is not shown. The last display on the console is
Waiting for HOME ('android.process.acore') to be launched...
I tried reinstalling Eclipse and Android again. It still did not work. Also the console does not show any errors. The log cat has the following errors:
06-18 20:39:11.543: ERROR/flash_image(544): can't find recovery partition
06-18 20:39:11.843: ERROR/vold(538): Error opening switch name path '/sys/class/switch/test2' (No such file or directory)
06-18 20:39:11.843: ERROR/vold(538): Error bootstrapping switch '/sys/class/switch/test2' (m)
06-18 20:39:11.843: ERROR/vold(538): Error opening switch name path '/sys/class/switch/test' (No such file or directory)
06-18 20:39:11.843: ERROR/vold(538): Error bootstrapping switch '/sys/class/switch/test' (m)
06-18 20:46:31.842: ERROR/MemoryHeapBase(578): error opening /dev/pmem: No such file or directory
06-18 20:46:31.892: ERROR/SurfaceFlinger(578): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
06-18 20:46:32.313: ERROR/GLLogger(578): couldn't load library (Cannot find library)
06-18 20:46:33.634: ERROR/GLLogger(578): couldn't load library (Cannot find library)

The solution which worked for me is, when you get the message:
Waiting for HOME ('android.process.acore') to be launched...
Wait for few seconds and then right click on the project and click run as Android application once again.

I faced the same problem. However, it worked after i went to Project->Clean...
Don't know why it happened though.
Hope this helps

I get this problem all the time and have lost many hours of potential productivity and education while I try to fix it. The only thing that works for me is the combination of three other good answers:
Project -> Clean
Delete all the AVDs and create new ones
If an attempt to run still hangs too long on 'Waiting for HOME' (over two minutes) or the emulator keeps rebooting every minute or so, try Run as Android App several times, choosing the same existing emulator instance (I always choose runs manually).
It's odd that no one has a clue why this problem comes up, what causes it or what is going on internally. The only clue I can supply is that DDMS shows a few lines like "Class not found for preloading: libcore.base.CollectionUtils" during the 'Waiting for HOME' pause.

What worked for me was to delete the AVD from the AVD manager and create a new one. Then go to
Run >Run Configurations, select the target tab and choose the new AVD.

Following steps worked for me:
1. Goto Project -> Clean.
2. Delete your previous AVD and create a new one.

This problem occurs because while creating the AVD manager in the "Create new Android virtual device(AVD)" dialog window ,"Snapshot" was marked as "Enabled" by me.
Solution:
Create a new AVD manager with the "Enabled" checkbox not checked and then try running the project with the newly created AVD manager as "Target" , the problem will not occur anymore

I solved this issue by creating a new virtual device and launching it from the AVD manager. The device takes a few minutes to start, you just have to wait. Then you can run your application on the already started device.

Options:
Click on the HOME Button on the Emulator. Wait for may be 2
seconds....
This always works for me!!!
or
Go with Shreya's suggestion (one with most suggestions and edited by
Gray).

I had only 12 Mb for the SD Card in the AVD device.
Increasing it to 2 Gb solved the issue.

SOLUTION:
Run the emulator from the command line:
sdk/tools> ./emulator-x86 -avd <DeviceName> -partition-size 1024 -gpu on
Then I launched the app from the command line as well (using built-in Cordova/PhoneGap tools):
myapp/cordova> ./run
BACKGROUND
I believe this is some sort of hardware compatibility issue. I came across this problem when following the PhoneGap 2.4.0 Getting Started Instructions. I followed their advice to install the Intel Hardware Accelerated Execution Manager, and I think this is the source of my trouble. Eclipse uses the emulator64-x86 program (in the sdk/tools folder) to launch the emulator. I could not find any way inside of Eclipse to change this but I found by following the "Tips & Tricks" section of the Intel HAXM web page that I could get the emulator to run successfully from the command line by using the emulator-x86 program instead. I'm not sure why the emulator64-x86 program doesn't work on my system. I confirmed at the Apple website that I do have a 64-bit processor.
My system:
OSX 10.6.8
2x2.26 GHx Quad-core Intel Xeon
6 GB RAM
ADT v21.1.0-569685
Eclipse 3.8.0
My AVD:
Device: Nexus One
Target: Android 4.2.2 - API Level 17
CPU: Intel Atom (x86)
RAM: 512
Internal Storage: 256
SD Card: 128

I created a new device. Deleted the previous one.

None of these solutions worked for me. Instead, what worked was to go to a command line tool (or terminal in Mac), CD into the SDK/platform-tools directory, and then run this:
adb kill-server
then run this:
adb start-server
After I did this everything worked again. Why? Who knows.
On my MAC the path to the platform-tools folder was $HOME/Installations/adt-bundle-mac-x86_64-20130522/sdk/platform-tools
It will probably be somewhere else on your machine.
I also found this page that presents some helpful steps:
http://android.okhelp.cz/android-emulator-wont-run-application-started-from-eclipse/

What worked for me was enabling the checkbox "Use Host GPU" when creating or editing the AVD (Android Virtual Device). This checkbox was not enabled by default.

It worked for me when I selected 'Use Host GPU' option under 'Emulation Options:'.
You can find the option under Edit window of the virtual device.

I increased the virtual device SD card size from 500MB to 2GiB, the problem solved.

Following steps worked for me: 1. Goto Project -> Clean. 2. Delete your previous AVD and create a new one.

I noticed this is an old post. However I just ran into the same problem and found a solution. A) Make sure you have the CPU/ABI is atom
B)Ram is 2048
C)VM Heap is 256
D)Internal Storage is 200
E)Make sure to check the Use Host GPU
F)Device is Nexus 5 (My personal choice)
G)Android 4.4.2 API Level 19

Related

Lost connection to the debugger on iPhone simulator running Big sur11.4

I have face the issue while running my app on Big sur 11.4.While run the app I got "Build succeeded" message but after app is automatically stops then showing a popup message like
Lost connection to the debugger on “iPhone 12”.
Domain: IDEDebugSessionErrorDomain
Code: 4
Recovery Suggestion: Restore the connection to “iPhone 12” and run “APP_TARGET_NAME” again, or if “APP_TARGET_NAME” is still running, you can attach to it by selecting Debug > Attach to Process > APP_TARGET_NAME.
--
System Information
macOS Version 11.4
Xcode 12.1 (17222)
Please help me how to resolve the issue.
This usually happens with apps with lots of dependencies so they take too long to launch, making the debugger to abort and time out.
A temporary solution would be:
Create (or edit in case you already have) a .lldbinit file in your home directory. vim ~/.lldbinit.
Add this to the end of file: settings set plugin.process.gdb-remote.packet-timeout 300.
Restart Xcode and try again.
I have tried this way and it is working like uncheck debug executable option.
Choose Edit Schema->Info->uncheck Debug executable

Android emulator with custom build does not accept keyboard entry

I have a custom Android image using a custom built goldfish kernel. I have been using the Emulator for SW development.
emulator -kernel out/target/product/atom/kernel
When I upgraded to SDK 20 I no longer get keyboard input from neither the host nor the graphic keyboard. This used to work. I have seen the comments about setting the hw.keyboard property=yes. I am not able to find a sequence of operations that work.
a) try and launch the emulator and force my hardware config
emulator -verbose -kernel out/target/product/atom/kernel -qemu -android-hw /home/jgrecco/work/ics-4.0.4/out/target/product/atom/hardware-qemu.ini
The hardware-qemu gets overwritten and the hw.keyboard option is no.
b) Create an AVD and have it load my custom kernel and image
ex: android create avd --force -b x86 -n aal_emul -t 3
emulator -kernel out/target/product/atom/kernel -show-kernel #aal_emul
But have not been able to get the AVD to boot my custom image. It seems to boot a default image. I've tried copying over the img files but no luck
c) Tried modifying the default hardware.ini settings
ics-4.0.4/external/qemu/android/avd/hardware-properties.ini with no effect.
many many other variants.
If someone could make any of the solutions above work or tell me one that will I would appreciate it. BTW this is for x86 atom.
TIA
After much experimentation, Googling, lots of cursing inaccurate (out of date) documentation and updating all of my sources (fighting with repo sync hangs – rant off), I’ve figured out a work around. I thought I would post this for the benefit of others.
The basic problem was that after upgrading to SDK 20 I no longer could input to an application using ANY means (real or emulator keyboard). This only occurred when loading my own custom image "lunch #; emulator -kernel out/target/product/...". None of the attempts to override the hw.keyboard property as described above worked for me.
The work around I’ve found is to change the setting in the emulator at runtime. Settings->Language & input->default_Hardware Physical keyboard (OFF). While I can’t use the host keyboard I can now use the emulator keyboard for input.
Try setting 'hw.keyboard=true' in the file config.ini which exists alongside hardware-qemu.ini.
This overrides the default value in hardware-qemu.ini and shouldn't be overwritten.

Issue while launching project in device

I am facing a weird issue while running my project on the device. I see below error even though the app file is present in the mentioned path. Also the project gets copied in the device & I need to tap on app icon to launch it but it fails while launching from XCODe. Any clue - is this because of spaces in my schema name?:
error: failed to launch '/Users/abhi/Library/Developer/Xcode/DerivedData/MyProject-atlkwwnwccqaopgembmyzeecthfx/Build/Products/QA - Debug - Production-iphoneos/MyProject.app/MyProject' -- No such file or directory (/Users/abhi/Library/Developer/Xcode/DerivedData/MyProject-atlkwwnwccqaopgembmyzeecthfx/Build/Products/QA - Debug - Production-iphoneos/MyProject.app/MyProject)
Delete app from your device, switch OFF and ON your device, clean your code and then run it on device, it will install..
If not Restart your Xcode...
I have tried this when i have faced same problem and this one worked for me
Tried advice by Sree Charan with no success for XCode 4.3.3. Ultimately (and I'm not sure this is what fixed it), I went to Validate Settings on the Editor Menu and it updated settings from GDB to LLDB and then it worked.
I'm only providing the info above in hopes it might help someone else. I have no way to verify that is what fixed this problem (and I spent 2 hours looking for a solution).

Failed to launch simulated application: iOS Simulator failed to install the application

When I create a new window based application, I get:
Failed to launch simulated
application: iOS Simulator failed to
install the application.
I tried to do what this post suggest, but didn't work
Any suggestions? I haven't tried re-installing xcode yet.
Choose Reset Content and Settings in the File menu of the Simulator.
Build Clean in Xcode
Then try again.
I'm not sure why, but rebooting my machine seemed to fix it.
I had the same problem. A reboot also did the trick, but then I realized that the directory
~/Library/Application Support/iPhone Simulator/6.1/
looked "different" after the reboot (Directory "Root" was missing). So I tried to reproduce the error by deleting the directory or parts of it. The simulator each time recreated the directory and worked fine. Maybe the reboot is not really needed just recreating the mentioned directory would also help.
Try to delete project.xcworkspace file and xcuserdata dirctory in your project
It seems that the processes don't get cleaned up properly each time you stop the app with ps aux in Terminal showing a large number of processes representing your app on the simulator.
I expect some kind of upper limit is reached with the number of processes / memory. (Indeed I have found that XCode will fail to build because some posix resource can't be found because there isn't memory to load it)
A machine restart clears all of these dead processes and allows room for new ones. For me, I only have to do this after about 2-3 weeks of not turning my computer off, but I suppose what resources you have and how often you use the Simulator will affect it.
If someone knows how to clear all these dead processes without restarting, that would be useful please, killall ... doesn't seem to have worked for me, but feel free to add to this answer.
Simply go the info.plist file property and set 'Copy to Output Directory' to 'Copy Always' it will resolve your problem.

iPhone Simulator: SpringBoard failed to launch application with error: 7

Building an iPhone project results in:
Failed to launch simulated application: SpringBoard failed to launch application with error: 7
And the app doesn't install on the simulator. What's this all about? What's SpringBoard and what is error 7?
I had the exact same problem - I reset the iphone simulator and then quit the simulator (i.e. command q) then started it again.
Worked.
Boy, is the answer to this one hard to find, but I came up with a workaround. The simulator gives this error if it has any problems with accessing files in ~/Library/Application Support/iPhone Simulator/. This could be a permissions problem, but in my case it was even more subtle: my home directory is NFS mounted, and that seems to somehow be the source of the problem.
The basic workaround is to create a directory local to the machine, and link the iPhone Simulator's directory to that local directory. You shouldn't need to move your source files or project directory; it's just the simulator targets that are the problem.
Here is one series of steps to accomplish the workaround, to be typed in at the terminal
(1-3 done on every machine you'll be developing on, 4-6 once in your NFS-mounted home directory):
sudo mkdir /usr/local/iphone-dirs
sudo chmod 777 /usr/local/iphone-dirs
mkdir /usr/local/iphone-dirs/my-dir
cd "~/Library/Application Support/"
rm -rf "iPhone Simulator/"
ln -s /usr/local/iphone-dirs/my-dir/ "iPhone Simulator"
There are obviously many variations on this theme; I suspect that using a locally-hosted directory in /tmp would be fine (and not require admin privs, but would have to be redone every time the system is rebooted). As given, steps 1 and 2 are good if you will have multiple users using these machines that you don't want to collide with each other. If you have your own personal machine but NFS-mount your homedir, you could probably just skip to something like step 3 (and sudo it). Just make sure that whatever dir you create in step 3 is the dir that you symlink to in step 6.
No need to quite the simulator or delete the app..
Just select simulator, press command + shift + h + h and remove the app from background process(long press on app icon) then run your app again.
I started with a new project in Xcode and got the error 3 message, but otherwise same deal. New damn project - so no problems with broken code I added or name mistakes or anything else. But the app would build but fail to run in Simulator with the Springboard -3 error code. I've seen this before lots of times, and the basic kill-the-app-in-simulator, clean-and-run would work, but not this time.
Turns out my old 2007 iMac barely has enough RAM and disk space free any more. I'm running Mavericks, and I hid everything but Xcode and the Simulator, then ran a memory cleaning utility to free up every bit of RAM available (got back up to 1GB free or so), and then the app runs in the Simulator without a hitch. No more Springboard error.
I hadn't seen "too little RAM" listed as a reason for this error yet, so this may be useful for somebody else.
Springboard is the app that launches apps. It's the home screen of the iPhone. I had tons of problems when I tried to get my app running on the phone -- turns out that I had an older version of the SDK that was incompatible with the version of the OS my phone had. Reinstalling the latest SDK did the trick.
Also, have heard that clearing the XCode cache sometimes helps (didn't for me) -- XCode menu->Clear cache...
Maybe this will help: http://discussions.apple.com/thread.jspa?threadID=1605042&tstart=72
I had similar issues when I was trying to install my current development on the iPhone and this information about the AppID fixed it.
For quick reference, the AppID you created when you started creating certificates for development and provisioning of your iphone asked you to create a reverse domain name identifier. Something like: QS32H9XPNE.domain.subdomain.companyname.*
To correctly link up your application to the AppID would require you to set the identifier in the application to domain.subdomain.companyname.application.*
Hope this helps
I had the same problem but this solution works...!!!
1)Deleting the app from simulator.
2)Quitting simulator.
3)Restart simulator.
XCode menu->Clear cache solved my problem.
This happens to me when i switch from testing on the device to testing on simulator. Restarting Xcode and simulator gets rid of this error for me.Silly.
I initially solved this by restarting the iPhone Simulator. But this shouldn't be the answer.
The error came from editing the info plist.
Check that you didn't change any values that were set before provisioning your app for your device.
I wanted to change my Bundle Identifier, but had to go back to the default one after having this error.
Now it's fixed.
Next step will be to get a new provision Id with the Bundle Id changed.
I had same problem, the Simulator would just hang. This is on a fresh install of XC 3.2.5 GM and using Simulator with 4.2 SDK. Apps would run fine on a real device but the simulator would just hang.
I ended up changing the iPhone App Support directory and all sub dirs to 777 access permissions. Not a great idea to 777 -R, but I was desperate and it worked.
$sudo chmod -R 777 ~/Library/Application Support/iPhone Simulator/
For me this was solution. If you have enable background fetch mode. Remove this option if you are getting this alert during run app in simulator.
I had the same problem.
It happens as follow...
I had a folder storing images in some sub-folders.
If I add the root image folder as "directory", I receive this error.
If I add the root image folder as "group", simulator runs fine.
weird...
It happens to be related to folder name as well. My image folder was originally named "contents" and I got the error described.
Changed the folder name to "image_files" and reimport it to Xcode project as "folder". It works!
This is totally random...
That did it for me, too:
This happens to me when i switch from
testing on the device to testing on
simulator. Restarting Xcode and
simulator gets rid of this error for
me.Silly.
When a home directory mounted in NFS you have the problem with the simulator.
To get rid of it, you need to to create a couple of directories in some local place where you have permissions to write, "iPhone Simulator" and "Interface builder". Then remove "~/Library/Application Support/iPhone Simulator" and "~/Library/Application Support/Interface Builder 3.0". And finally create symlinks at the exact places of the removed directories pointing to the local directories.
For mine, I got the error when I tried to change the App bundle ID setting in my info.plist file for the sake of running a test. Changing it back cured the problem, but didn't do me any good for the test. Thankfully, the app had loaded in the simulator and I ran it manually for my test.
As far as I can tell, the problem stemmed from having a bundle ID that matched both a specific ID and a wild-card ID. The App IDs I've tried that match only a specific ID/Profile haven't shown a problem.
Check your console and you will get a better idea of what the error might be. That error number is pretty generic. In my case I had an error in my Plist file. I chenged something that I shouldn't have. But I realized this was the problem because the console had a more detailed error message:
2010-09-13 23:30:27.149 Appname[5580:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle:
... and it goes on.
I have had this problem frequently, and generally just quitting and restarting Xcode works.
However, I just had this problem again and nothing seemed to fix it - quitting the sim, Xcode, rebooting… What was strange was some targets worked (I have multiplied build targets for this project), and other projects worked. But one target failed to launch no matter what I did.
In the end, I found the problem: In the target's properties the executable name $[EXECUTABLE_NAME] got accidentally deleted ! Replace it, and it works.
Worth remembering…
I got same error. This is how i solved it. Hope this helps.
To show all hidden files type below from command line
$ defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder
Access DerivedData folder and delete it's content(under DerivedData). Basically this is Simulator Cache which sometimes does not get deleted from XCode. Library is a hidden folder
and that is why we run Step 1.
/Users/your username/Library/Developer/Xcode/DerivedData
Quit and re-open simulator , it will work i also got an issue like this and this helped me.
I am facing the exact same issue very frequently, what I do is
1) I quit the iphone simulator
2) and if after following step 1, if issue still the same, then reset the simulator
And it has resolved my issue all the time from step 1 itself.