Eclipse: does not launch the app after installing .apk (android) - android

Recently after having updated lots of stuff on android SDK something happened to Eclipse.
I'm running the apps on an actual device instead of an emulator. Before the updates, after I used to click 'Run' and select my device, it would upload the .apk to the phone and immediately launch the app. For some reason, it doesn't do that anymore and simply stops after installing:
[2011-11-09 18:17:18 - helloworld] Android Launch!
[2011-11-09 18:17:18 - helloworld] adb is running normally.
[2011-11-09 18:17:18 - helloworld] Performing com.example.helloandroid.HelloAndroid activity launch
[2011-11-09 18:17:26 - helloworld] Device API version is 10 (Android 2.3.6)
[2011-11-09 18:17:26 - helloworld] Uploading helloworld.apk onto device '363294A87A1000EC'
[2011-11-09 18:17:26 - helloworld] Installing helloworld.apk...
The phone is on debugging mode and I generally haven't changed anything on Eclipse's settings - it literally stopped working after the SDK updates. Any idea how to make it automatically run the apps again?
Thanks

sorry for my bad english. I had the same problem after sdk updates. To solve this problem you have to update also "Android DDMS", "ADT" and all other components on eclipse. To do this open eclipse and click on "Help -> Check for updates". All android parts in eclipse will update automatically to the latest version (the version of SDK). I hope that this will work also for you. Bye.
Matteo

<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Make sure these are in your manifest in the intent filter for your activity.

In Eclipse, Right click on Project > Runs As > Run Configurations > select Launch Default Activity under Android Tab.

Look in your "Run Configurations under the project context menu. Right click on your project and choose "Run As -> Run Configurations". Choose target tab and choose "Manual" for deployment Target Selection Mode. This will allow you to see what Eclipse should see when it is looking for a target. If your phone doesn't show, then you may have to configure something else.
You did not mention phone type.
Also verify your original Virtual Devices are still in AVD.

Related

Android studio: emulator is running but not showing up in Run App "choose a running device"

I have launched my emulator via the AVD manager and once it's running I have clicked on run app. I have waited a couple of minutes for my running device to show up in choose a running device but the window always stays blank.
Probably the project you are running is not compatible (API version/Hardware requirements) with the emulator settings. Check in your build.gradle file if the targetSDK and minimumSdk version is lower or equal to the sdk version of your Emulator.
You should also uncheck Tools > Android > Enable ADB Integration
If your case is different then restart your Android Studio and run the emulator again.
This thread helped me to solve my problem, in particular this answer:
In Android Studio go to Menu -> Tools
Android
Uncheck Enable ADB Integration
Had similar issue with my emulator.
Solved by Wiping Data of emulator
Tool > ABD Manager > Down arrow under Action Wipe Data
Note : This is remove all data inside emulator.
For anyone else having the issue - none of the answers provided worked for me.
My case may be different to others but I had Android Studio installed first which installs the SDK by default to: C:\Users\[user]\AppData\Local\Android\sdk. We then decided to use Xamarin for our projects, so Xamarin was installed and installed an additional SDK by default, located here: C:\Program Files (x86)\Android\android-sdk.
Changing Xamarin to match the same SDK path worked for me which I did in the registry (although through the VS settings I'd guess it's the same):
\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools\Path
Change the path to match the Android Studio SDK path, close everything, start the VS Emulator, run Android Studio, ensure ADB integration is off and try. It worked for me.
If you uncheck the ADB Integration, you cannot use the debug any more.You may just restart the adb server, run
$adb kill-server
$adb start-server
in Terminal to restart the adb server without restarting the Android Studio. Then the emulator shows up.
My emulator used to suddenly disappear but the app still continues to run.
Solution-
Open task manager and kill qemu-system (Under Android Studio). This will stop the emulator. Then restart emulator.
Your adb connection is broken.
close eclipse
open cmd-prompt type adb kill-server then adb start-server
reopen eclipse
run the project!
Wipe the data of your Android virtual Device and then start the emulator. Works for me.
I had the same issue on a brand new computer, and the reason was simple. Although I downloaded and unzipped the Android SDK, I didn't add it to the PATH. So:
On Windows, you have to launch envvar and there, add the path to your android/platform-tools
On MacOS, edit the .zshrc file in your home, and add
export PATH="$PATH:/your/own/path/to/android/platform-tools"
This answer is not proposing a solution. Just a workaround in case someone is looking
I am using Idea based Android Studio (some people are talking about eclipse one here)
When I launch the app in the emulator (using the Run App button of Android Studio) AVD shows up but the app does not launch or run.
However when I connect my mobile and launch the app on my mobile the App works (this itself took some time, enabling developer options on mobile and doing the right configuration)
Because My app is launching on connected mobile, I can say nothing wrong with App.
There is some problem with AVD integration which I could not figure out so As of now I am working around my problem following way.
1 - I installed the app manually by dragging the APK file on AVD. (APK file is app\build\outputs\apk\debug folder)
2 - Then my AVD was not showing the installed APP list.
3 - I searched my APP using Google bar on AVD and dragged the APP icon on the home screen of AVD.
4 - I can now launch the APP using my APP icon on the home screen of AVD.
**That's how I am working around my problem. **
I have verified that Run App Icon does install the Application. Installation, not launching, appears to be the problem for me.
try to open the emulator and run it parallel with android studio/eclipse and the option will be displayed to select in the choose the device(emuator name, mine is Genymotion).
Check the android path of the emulator.
I had to change the registry in here:
HKEY_LOCAL_MACHINE > SOFTWARE > WOW6432Node > Android SDK Tools
to the actual path of the sdk location (which can be found in android studio: settings-> System Settings -> Android SDK)
All the credit goes to the author of this blogpost www.clearlyagileinc.com/
start device from genymotion button (have to install genymotion before and setup genymotion folder location on settings)
run application
choose genymotion running device
in your device you want to run app on
Go to settings
About device >> Build number triple clicks or more
and back to settings you will found "Developer options" appear
go to and click on "USB debugging"
Done

'No active compatible AVD's or devices found

I'm new with Eclipse ADT, and I tried to run an app on my tablet (a Samsung Galaxy Note 10.1), but there is an error as below:
[2013-12-26 12:37:41 - SDK_Example] ------------------------------
[2013-12-26 12:37:41 - SDK_Example] Android Launch!
[2013-12-26 12:37:41 - SDK_Example] adb is running normally.
[2013-12-26 12:37:41 - SDK_Example] Performing com.metaio.Example.MainActivity activity launch
[2013-12-26 12:37:41 - SDK_Example] No active compatible AVD's or devices found. Relaunch this configuration after connecting a device or starting an AVD.
Can anyone tell me why my device isn't found?
So if you are using emulator then close it.
In Eclipse select Run > Run Configurations > Target > Always prompt to pick device > Run.
Now select a a device from the list or a launch a new emulator. The next time you Run the project it should work.
Seems like your device is not getting detected by the ADB.
Check if you have enabled USB debugging in your tablet or not. Sometimes disconnecting and re-connecting the device also makes it work. Also bear in mind that the API level of your application should be supported by your device.
The error shows that the API level which your application having the compatible emulator for that API level does not exists. You need to create the emulator compatible to your application's api level.
OR
If your emulator is already started then You need to reset the ADB to make the emulator available. Go to DDMS > In Device tab > Select Down arrow> Select Reset adb option.
Check out the image
This error message will appear , if there are no compatible android API in SDK is found. Try to update your eclipse with appropriate API. To update your API go to Window -> Android SDK Manager. Then choose required API version from Android SDK Manager window. Finally press install packages button .After required packages installation completed, create new AVD for your project and Run your project.
You have to create an emulator or use a device that is compatible with API target. i.e the device or emulator should have a android version that is compatible with your project.
I had the same problem. I had usb debugging set and eclipse was running the app fine and then it stopped one day. I discovered, with the help of other comments here that my phone had to be set as a mass storage device otherwise it wouldn't work. Once I changed it from camera, or another setting to mass storage it worked. I must have played with the usb setting and changed it. The manual didn't mention that mass storage was necessary.
In androidmanifest.xml try to support the version from API level 8 onward
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
and even try to unable USB debugging in your mobile ..
Before to that you should have Mobile sync installed in the system...
once you try to edit the code in the project and even try to clean the project and run it ..,

Cannot Target Physical Devices

I cannot select either of my devices from the ADT device manager. This is a (nearly) fresh install of the ADT direct from Google. About a year ago I was using the Android plugin for Eclipse, but since that didn't work either I installed the ADT.
I have installed and updated everything under Tools, Android 4.2, and Extras in the Android SDK manager. I haven't installed anything else.
I have both a Nexus 7 (4.2.2) and a Samsung Fascinate (2.3.5) that I am trying to send my app to. I'm using the USB cable that shipped with my Nexus 7 to connect the devices to my computer. Both have USB Debugging checked.
I have not changed anything inside my test project, everything is as it was from just clicking next through the project builder.
I am using the default launch configuration, all the settings are default as well except for the Project. Here is the full console log from loading the ADT to after attempting to run on my device:
[2013-02-20 18:53:42 - test] ------------------------------
[2013-02-20 18:53:42 - test] Android Launch!
[2013-02-20 18:53:42 - test] adb is running normally.
[2013-02-20 18:53:42 - test] Performing com.example.test.MainActivity activity launch
[2013-02-20 18:53:42 - test] Failed to find an AVD compatible with target 'Android 4.2'.
[2013-02-20 18:54:42 - test] Performing com.example.test.MainActivity activity launch
[2013-02-20 18:54:45 - test] Launch canceled!
The 6th log entry occurs after the ADT gives me a dialog that says "No compatible targets were found. Do you wish to add a new Android Virtual Device?," to which I press no. The Android Device Chooser then appears, and there are no devices for me to pick from.
I have Googled that 5th log, but it turned up nothing that worked. They suggested that I change the minimum and target versions, or that I use a virtual device. I'd like to use my physical devices if possible. Thanks for any help.
Have you installed your OEM usb drivers? Have a look at this link:
http://developer.android.com/tools/extras/oem-usb.html

Android emulator doesn't start anymore

I'm running on OSX Mountain Lion. I recently installed the latest version of Eclipse and the Android SDK from Eclipse. I updated the SDK through Eclipse as well, downloading everything in the Extras, Android 2.2 (API 8), Android 4.1.2 (API 16) and the Tools folder.
Finally I could run the emulator by creating a device but it was very slow (I have 250gb ssd hard drive + 16gb RAM), I couldn't even run the application I had. I tried to modify some options of the emulator and now apparently I can't run anything anymore. As soon as I try to run a program (Hello World) I get the following infamous Mac OSX error:
emulator-arm quit unexpectedly.
The console output for Eclipse is the following:
[2012-10-19 15:46:06 - test] Android Launch!
[2012-10-19 15:46:06 - test] adb is running normally.
[2012-10-19 15:46:06 - test] Performing com.example.test.MainActivity activity launch
[2012-10-19 15:46:06 - test] Automatic Target Mode: launching new emulator with compatible AVD 'test'
[2012-10-19 15:46:06 - test] Launching a new emulator with Virtual Device 'test'
I tried to reset things as they were before as well as creating a new emulator device. I tried to restart Eclipse and the machine itself but nothing. Apparently I can't run any Android application anymore.
Does somebody has some idea? I read on some similar thread to use adb to restart the thing, but apparently I can't get that running as well. By doing ./adb shell I get error: device not found. Do you have any idea about what can I do to solve the issue?
Thanks
The problem is essentially the AVD manager can’t re-open a virtual device that was on a second monitor on a Mac. The work around is to edit the following file
~/.android/avd/.avd/emulator-user.ini
(depending on your system, this may be at ~/.android/avd/Default.avd/emulator-user.ini too)
and change the window.x and window.y entries to
window.x=0
window.y=0
Source: http://timvoet.com/2013/01/04/avd-emulator-crashes-on-mac/
FWIW I noticed that running VirtualBox seems to get a lock on HAX which prevents android emulator window from ever opening. Closing VirtualBox seems to release the lock and everything works again.
Update your android sdk. In eclipse it should be an button next to the open avd manager button. or from command line try android update sdk --no-ui.
the following link should help scroll down to see how to update. https://wiki.appcelerator.org/display/guides/Installing+and+Updating+Android+SDK
I had the same problem but the suggested ideas didn't solve my problem, after swearing and waving my fist at the Gods, I worked backwards to when it WAS working, and decided to change my SDK Tools version back from the Android SDK Tools RC 22.6 to Android SDK Tools 22.3.
Start up emulator64-x86 4.4.2 intel atom instance and low and behold it works again.
2 valuable hours later... Gotta love working with Android. :O
Moral of the story don't use the Preview Channel Releases.

How to launch an android application in eclipse

So I've done the "Hello, World" tutorial on the android developer site. Instructions on how to launch the application:
1) Select Run > Run.
2) Select "Android Application".
Simple enough. Except what starts is the android default launcher, not the application. How do I get the actual application to start?
Code is a copy paste from: http://developer.android.com/resources/tutorials/hello-world.html
Edit: Haven't tried logcat yet, but the console gives me:
[2011-08-23 15:57:19 - HelloAndroid] Android Launch!
[2011-08-23 15:57:19 - HelloAndroid] adb is running normally.
[2011-08-23 15:57:19 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2011-08-23 15:57:19 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'MyPhone'
[2011-08-23 15:57:19 - HelloAndroid] Launching a new emulator with Virtual Device 'MyPhone'
Edit2: Apparently this is a known problem. The solution provided by google doesn't work for me, but might for someone else: http://developer.android.com/resources/faq/troubleshooting.html#eclipse
Edit3: I've found numerous people with the same problem, but no solutions so far. Workaround: use a physical device. The program runs fine on my Nexus One. I'm leaving the question for now, can't spend more time on this.
Right click to your project -> Run As -> Android Application
Right click on your project and select Run -> Run as -> Android Application.
Sometimes it doesn't start the application. You can launch the menu and you would see your application installed there. You can then manually launch the application.
Sometimes trying to run the application multiple times from Eclipse as well helps!
This may happen if another project (even a non Android project) is selected in your Eclipse workspace tree.
In that case, the Run command will be applied to this project even if a source file of HelloWord is opened on the edition screen.
Ensure that a source file of HelloWorld, or the project HelloWorld itself, is selected.
Or you may just need to unlock the Emulator that started.
When running the app from Eclipse, an emulator is started. But it appears locked. You have to unlock it to make the keyguard to disappear, as if it was an actual cellphone.

Categories

Resources