Thursday, February 23, 2012

emulator: WARNING: Unable to create sensors port: Unknown error

Console error:
emulator-5554 disconnected! Cancelling 'com.[your apk] activity launch'!

Attempt 1:
Tried to kill adb.exe via task manager and run again -> fail

Googled, found proposed solutions:
  1. Try cleaning the user data on your emulator. To do so, open your avd location (for me it was "C:\Users\\avd") find your emulator (I guess it's 3DEVO.avd) and delete the files called "userdata.img" and "userdata-qemu.img".
  2. While your program is running and stuck, open your Task Manager, go to processes and kill adb. Go back to Eclipse and run again. If there's an error about adb not launched, quit Eclipse and launch again
  3. Uninstall/Reinstall Eclipse (Me: WTF!? Don't do that!)
What I did, and succeeded:
  1. In Eclipse, go to "Window->AVD Manager"
  2. Find the offensive AVD inside the list of existing Android Virtual Devices
  3. Bitched "Oh great, it's green (meaning valid, and not red meaning failed to load, which is more accurate)"
  4. Click on the offensive AVD
  5. Choose "Start..."
  6. Tick on "Wipe User Data"
  7. Press Launch
  8. Android emulator will be started. I notice it will take a longer time, which makes me think that keeping the user data is a form of caching -> faster loading. For subsequent faster loading, I think you can uncheck wipe user data.
  9. Success. Now close the AVD Manager and run your app. Case closed.
Notice something interesting? I keep bitching about Android, and I haven't even gotten started on my implementation. Fun times everyone~! Should I build the simpler game, and focus on the graphics, or take a longer time and build the other game? Arghz. Whatever it is, I will continue to hate on the emulator. Forever!!!

No comments:

Post a Comment


Related Posts with Thumbnails