7

I'm running Eclipse 3.7.2 on a Win7 machine. I have the Android SDK and AVD. All was working well. I have an Android App project that I've run under the emulator on an AVD and on a real Android device. ADB worked fine as well.

At some point I grabbed SDK Android 4.0.3. Then I had to upgrade a few more things that I cannot remember, perhaps my AVD. But ever since this upgrade there is no option to run my package as an Android Application anymore. If I choose "Run" it throws up a menu asking me to select a way to run it and "Android Application" is not a choice. It has to be Java App, etc. If I open "Run Configurations" there is no "Android Application" in my left column.

My SDK manager still lists Android 4.0 and Android 4.0.3 as "Installed." My AVD Manager still let's me launch an Android virtual device and even create a new one. But Eclipse does not let me run my package as an Android Application.

yorkw
  • 40,926
  • 10
  • 117
  • 130
Joe C
  • 2,728
  • 4
  • 30
  • 38

5 Answers5

5

Make sure you check for updates to the Android ADT plug-in for Eclipse in addition to upgrades for the AVDs, SDKs, and other debug tools. Then make sure you're in your Android perspective (upper left of Eclipse window), rather than some other/generic Java perspective (no Android-specific options).

Also, you can check under Window > Customize Perspective... in Eclipse to double-check that all the Android options (menus, context items, views, toolbars) you want are enabled.

UPDATE: You can add the Android tools to any perspective (I named mine "Android"). From the DDMS or Java perspective, go to Window > Customize Perspective - DDMS. Click the Command Groups Availability tab, and make sure that "Launch" is checked.

Also go to Project > Properties > Run/Debug Settings and check that there is a Launch Configuration listed. Create/Edit that configuration and confirm that it has an Android tab (usually set to run the Default Activity from your Manifest).

If not, there may be something wrong with your project's association - try right-clicking on your Project in Project Explorer, go to Android tools (if available) > Fix Project Properties. I believe there's an Ant tool that can do this from the command-line, but you'd have to check the Android/Google docs.

There's also the possibility that something's off with your Eclipse installation or that you've got a newer ADT plug-in than your version of Eclipse. Eclipse Juno (v4.2) released at the end of June, and the most recent ADT plug-in may be looking for something that's not there in your v3.7 install.

MandisaW
  • 971
  • 9
  • 21
  • OK I went and updated my ADT Plug-in, AVD and SDK. It still does not show me any option to run my App as an Android App. I don't think it's letting me be in any Android perspective. I don't see anything related to an Android perspective in the upper left of the Eclipse window and I don't see anything about Android in Window->Open Perspective->DDM. Any other suggestions? – Joe C Jul 24 '12 at 22:58
  • 1
    I was never able to fix this. I just did a fresh install because I wanted to upgrade from Indigo to Juno anyway. So I installed Juno from scratch with the plugins and now I can run as an Android Application again. – Joe C Sep 12 '12 at 14:32
  • Sounds like either your Eclipse installation or the ADT plugin was corrupted. It's only one of the options I listed, so it's up to you if you want to mark this as answered. – MandisaW Sep 14 '12 at 15:05
  • I had the same problem. I had a mismatch in my Manifest. I cleaned it up and was able to select the Run As -> Android App – GothamNite Sep 20 '13 at 11:38
  • Somehow, after updating some other Eclipse plugins, my Eclipse had lost its Android support - including the problem described here, no "Run as Android application" option available any more. I reinstalled the respective plugin, but even now, my run configurations dialog box doesn't show anything related to Android. – O. R. Mapper Dec 15 '13 at 12:51
2

What fixed it for me was:

  • Right-clicking on the Project Name in the Package Explorer
  • Android Tools -> Fix Project Properties

After that I was able to just Click Run As -> Android Application and all was well for me

Levite
  • 17,263
  • 8
  • 50
  • 50
1

Click mouse right button on your project -> Configure -> Convert ADT Android Configuration

0

An easy fix is to manually create an android run configuration:

Run / Run configurations..., then right click on "Android application" and select new, select your project and click Run.

enter image description here

Jean-Pierre Schnyder
  • 1,572
  • 1
  • 15
  • 24
0

I had a similar problem. What I finally did that worked was go into Project->Properties->Java Build Path->Order and Export and I made sure that the /gen files we're first in the sequence followed by the /src files.

GothamNite
  • 101
  • 1
  • 5