Finally, after a long long time I am back to post some stuff.
When I had started off with setting up the environment for making Android apps, I had never ever imagined that its going to take so much of time! Finally after lots of R & D on the problem, I have come up with a solution which is rather different than what I read on most of the blogs and forums. So I was excited to share it with the world.
First and foremost, as of now, Eclipse classic 3.7 is not supported by Android ADT plugin. So better not use it for now. I tried it for long and failed and finally found out that its not yet supported. Then I went for Eclipse Indigo for Java developers. I followed the steps given on the Android developers website to install the SDK and ADT plugin. Everything was working like a charm, up until I started with our very own "hello android" app.
When I launched the app on emulator(NOTE: Patience is the key, it takes a lot of time to load emulator itself) I got this weird error saying:
[2011-11-12 00:13:59 - HelloAndroid] emulator-5554 disconnected! Cancelling 'com.example.helloandroid.HelloAndroid activity launch'!
I searched a lot on different forums and tried all possible solutions but then, none of them seemed to be working for me. Then I tried something of my own which worked.
Solution:
1) In the Eclipse window, go to window->AVD Manager, a window "Android Virtual Device Manager" will open, select the virtual device and hit "start".
2) Let the Virtual device boot and load fully.
3) Right click on your project, select Run-as->Run Configuration. In the "TARGET" tab select "Deployment Target Selection Mode" as manual, and check the "Wipe User Data" as well.
4) Click Apply, and then click RUN. A new window will pop up "Android device chooser". In this select "choose a running android device" and select the already running virtual device which we had run in Step 1. Now we are all set to roll. Hit OK and boom your app is loaded and it runs smoothly.
For information on how to install Android SDK visit http://developer.android.com/sdk/index.html and follow the simple steps.

No comments:
Post a Comment