"Launching As & # 8594; Android Application" is no longer a parameter in my Eclipse launch configuration

I am running Eclipse 3.7.2 on a Win7 machine. I have an Android SDK and AVD. Everything worked well. I have an Android App project that I ran under the emulator on AVD and on a real Android device. ADB worked great.

At some point, I grabbed the Android 4.0.3 SDK. Then I had to update a few more things that I don’t remember, perhaps my AVD. But since this update, there is no way to run my package as an Android application. If I select Run, it throws out the menu, prompting me to choose a way to launch it, and the Android Application is not a choice. It must be a Java application, etc. If I open “Run Configurations”, there is no “Android app” in my left column.

My SDK manager still displays Android 4.0 and Android 4.0.3 as "Installed". My AVD Manager still allowed me to launch an Android virtual device and even create a new one. But Eclipse does not allow me to run my package as an Android application.

+6
source share
5 answers

Make sure you check for Android ADT plugin updates for Eclipse in addition to updates for AVD, SDK, and other debugging tools. Then make sure that you are in your Android perspective (in the upper left corner of the Eclipse window), and not in some other / general Java perspective (no settings for Android).

Alternatively, you can check in Window> Customize Perspective ... in Eclipse to double check that all the Android options (menus, contextual elements, views, toolbars) you want.

UPDATE: You can add Android tools to any point of view (I called my "Android"). From a DDMS or Java perspective, go to Window> Customize Perspective - DDMS. Go to the "Availability of command groups" tab and make sure that the "Run" checkbox is selected.

Also go to Project> Properties> Run / Debug Settings and check if the launch configuration listed is there. Create / edit this configuration and confirm that it has an Android tab (usually it is designed to trigger the default operation from your manifest).

If not, there might be something wrong with your project association - try right-clicking on the Project project in Project Explorer, go to Android tools (if any)> Fix project properties. I believe there is an Ant tool that can do this from the command line, but you will need to check the Android / Google docs.

It is also likely that there is something with your Eclipse installation or you have a new ADT plugin than your version of Eclipse. Eclipse Juno (v4.2) was released at the end of June, and the most recent ADT plug-in may look for something that is not in your v3.7 installation.

+5
source

For me this has been fixed:

  • Right click on project name in Package Explorer
  • Android ToolsFix Project Properties

After that, I was able to just click Run As -> Android Application, and everything was fine for me

+2
source

Right-click in your project -> Configure -> Convert Android ADT Configuration

+1
source

An easy fix is ​​to manually create an Android launch configuration:

Run / run configurations ..., then right-click on the "Android application" and select a new one, select your project and click "Run."

enter image description here

0
source

I had a similar problem. What I finally did was work in Project-> Properties-> Java Build Path-> Order and Export, and I made sure that the / gen files are first in the sequence, followed by the / src files.

0
source

Source: https://habr.com/ru/post/917225/


All Articles