Android app not starting with Eclipse

Before launch: I searched google and stackoverflow, none of them gave a clear answer.

Situation: I am using Eclipse for Windows to develop an Android application. Therefore, when I try to run the application, the system outputs to the console

[2010-06-14 17:04:39 - HelloLinearLayout] ------------------------------ [2010-06-14 17:04:39 - HelloLinearLayout] Android Launch! [2010-06-14 17:04:39 - HelloLinearLayout] adb is running normally. [2010-06-14 17:04:39 - HelloLinearLayout] Performing com.example.HelloLinearLayout.HelloLinearLayout activity launch [2010-06-14 17:04:39 - HelloLinearLayout] Automatic Target Mode: launching new emulator with compatible AVD 'Default_2.1' [2010-06-14 17:04:39 - HelloLinearLayout] Launching a new emulator with Virtual Device 'Default_2.1' 

starts the emulator, but does not load .apk and does not start the action. Thus, the application still does not start.

I found a “solution” here , but this is unclear and doesn't seem to work. For example, I do not know which "emulator is processed" should be killed. I found adb.exe only. And this is the main thing: sometimes I was lucky to kill everything that they wanted and launch the application. But it is not defined.

Please help, I am completely stuck in this problem.

+4
source share
5 answers

I came across this situation many times and had to do a few things to solve the problem.

1) If DDMS is running, close it (sometimes it interferes with debugging).

2) Run the emulator, try connecting to DDMS, then turn it off, then go back to eclipse and run the debugger.

3) Kill the emulator, kill the adb process in the task manager, restart eclipse, then try debugging, allowing Eclipse to start the emulator, sometimes the first emulator download expires, so when it is fully launched, start debugging again.

In general, however, I found it much easier not to use the emulator and use the actual device, for me it is much faster.

+2
source

I tried a bunch of things for Eclipse on Windows, and this setting finally worked for me. Now I can run the emulator many times and deploy the application successfully:

  • In launch configurations -> Select target deployment selection mode as "Guide"
  • Then click "Run." The “Select Android device” appears.
  • Select "Launch a new Android virtual device" (this should show the AVD that you already configured)
  • Select AVD and click "Start"
  • Check only "Wipe user data" and uncheck other boxes
  • Hit start. This should start the emulator. Give him someday escape. Make sure the Android icon (and the Google search bar) is displayed on the home screen. It is important to wait until this appears. Otherwise, the application will not load. Depending on how fast your processor is, the time taken to load the initial screen will vary.
  • As soon as the main screen of the emulator opens, return to Eclipse, select this emulator in the Android Device Chooser device (the status should be on the network)
  • Click OK after you select this emulator.
  • The application will be loaded into the emulator (give it someday) and you will see how your application works on the emulator

This setting seemed to work for me every time. I cannot fully understand why this works, but the other “normal” way is not. But I'm glad that I was finally able to get the emulator and application to work.

+2
source

I ran into this problem on Linux (Mint 12, Eclipse Juno Java EE for web developers, Android API20, Sun Java 1.6). I could just start the emulator from the command line (ie "Emulator-arm -avd InsertYourVirtualDeviceNameHere -verbose"), but not from Eclipse. It just hung, as mentioned in the original poster. The way I fixed this was to backup the original “emulator” for safe storage, and then I made a copy of the “emulator-hand” and renamed it to “emulator”. These emulators are located in the "tools" directory of your Android SDK installation. I'm still trying to figure out how to get Eclipse to correctly point to the "emulator-arm" myself without this hack.

+1
source

It happened to me. It seemed to me that for me the problem was that the application was already running on the device on which I installed apk. When I closed it, it worked.

0
source

If you run in Eclipse, check your settings.

Run Configurations - Common - select a file in standard input and output - click

Workspace and select your project.

0
source

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


All Articles