2

I recently completed my first, very basic Android application however when debugging and testing I encountered what seems to be a very common problem. Eclipse and the emulator were giving me a similar problem to this emulator.exe has stop working?, and then after trying the recommended solutions I started receiving errors similar to this Android Emulator won't run application started from eclipse and receiving errors in Eclipse saying this:

adb is running normally.

Performing 'activity' activity launch

Automatic Target Mode: Preferred AVD 'TestAVD' is not available. Launching new emulator.

Launching a new emulator with Virtual Device 'TestAVD'

emulator: warning: opening audio input failed

None of the solutions I found worked unfortunately. Worked as in I was able to run my application in an emulator at all. So I decided to uninstall and reinstall the Android SDK. I followed the instructions in both a Beginning Android Programming book and the ones provided on the official Android website but to no avail. From the last time I downloaded the SDK, the Android SDK Manager is newly updated although appears to install correctly with no new errors. Also reinstalling the ADT in Eclipse seems to go smoothly. However I've noticed that when I now go to recreate a new Android project, it creates it differently to what the website and my book describes. The most prominent difference being that in my drawable folder, there is only an "ic_launcher.png" as opposed to having three folders for ldpi, mdpi abd hdpi. The AndroidManifest.xml also does not recognise android:targetSdkVersion or android:installLocation anymore saying there is no resource identified found. Another major problem is in my MultiTouchHandler class, MotionEvent variables such as ACTION_MASK or ACTION_POINT_ID_SHIFT for example, have the error cannot be resolved or is not a field. Before I uninstalled everything, these things worked perfectly and the application encountered no errors. The app worked!! Upon reinstalling everything, and moving my application into a new project to fix the initial problem, nothing works anymore.

I have googled and searched these forums for a good few days and all the solutions that have been suggested have not worked for me. I have uninstalled and reinstalled and redownloaded the SDK's I don't know how many times and I really don't want to give up on developing for the Android.. but I just can't seem to find a solution. Sorry for the lengthy post but I wanted to be thorough! Any help would be very much appreciated! Thank you!

Community
  • 1
  • 1
Chantelle
  • 21
  • 1
  • 4
  • When you re-installed the sdk, did you delete the workspace and the hidden `.android` directory? – Reno Nov 07 '11 at 02:39
  • No, I didn't. I have however realised that I needed to change in Eclipse which JDK I should be using in Window > Preferences > Java > Compiler. I then Fixed Project Properties and it appears to be running correctly. When I run the project now I do get new (occasional) errors which require me to uninstall the app from the emulator before rebuilding it. But at least I have it running! – Chantelle Nov 10 '11 at 17:58

0 Answers0