I use Eclipse IDE for developing Android applications. I have done pretty much the same things what is written on Internet to download and setup Android SDK on Eclipse. I allowed installation of non market apps also checked USB debugging option.
I am trying to run my very basic Android application on Galaxy Tab 10.1. When I start the application and press Run button on Eclipse.
on the console of Eclipse the following is written:
[2011-12-04 20:14:09 - dene] Android Launch!
[2011-12-04 20:14:09 - dene] adb is running normally.
[2011-12-04 20:14:09 - dene] Performing com.berkay.dene.DeneActivity activity launch
[2011-12-04 20:14:13 - dene] Uploading dene.apk onto device '4289143415F3397'
[2011-12-04 20:14:13 - dene] Installing dene.apk...
but it stops here and does not proceed.
On the other hand, when I use the adb tool and use command line
adb install
it successfully installs my program to my device.
but this way is quite time consuming. what can be the problem?
Related
I have been trying to search about this issue in the forums etc. but have not found any solutions yet. I have installed Eclipse 3.7.1 and using Android 3.0. When i want to debug the Android project, i select Debug As->Android application, simulator opens after a few mins but doesn't launch my app even after did lock swipe, but app is being installed. But, my biggest problem is, every time when i select Debug As->Android application, it always opens new simulator instance instead of launching my app in the existing launched simulator. Its killing, i'm not able to Debug my app at all directly.
Could someone please help me to set it properly?
Thank you!
CONSOLE: (every time when launches the new simulator)
Android Launch!
adb is running normally.
Performing com.company.myproject.SplashScreenActivity activity launch
Automatic Target Mode: Preferred AVD 'avd3.2' is not available. Launching new emulator.
Launching a new emulator with Virtual Device 'avd3.2'
2012-02-12 13:45:13.478 emulator-arm[2522:80b] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
emulator: WARNING: Unable to create sensors port: Connection refused
Connection refused for the sensor ports is a common problem when using a 64-bit install of Eclipse. Sometimes this error happens to working setups sporadically, but because this is a constant problem I am guessing that it is because you are running 64-bit Eclipse.
Developing in the 32-bit version of Eclipse should fix it.
A serious problem working with android dev with eclipse (with the plugin and sdk installed)
when trying to run an application to the emulator - the progress bar shows:
Launching: Performing pre-launch check..
and stucks there- doesn't continue even after a couple of hours.
I tried killing the adb process, running the emulator before the app and with 'wipe user info'
but nothing helps - just stuck at this stage
I also tried the answers at this thread but didn't help (mostly the same suggestion I already tried)
edit: sometimes(I'm not sure all the times) I'm getting this in the logs:
[2011-11-26 11:28:14 - hierarchyviewer]Unable to get view server
version from device emulator-5554 [2011-11-26 11:28:14 -
hierarchyviewer]Unable to get view server protocol version from device
emulator-5554 [2011-11-26 11:28:16 - hierarchyviewer]Unable to debug
device emulator-5554
any ideas?
solved this myself, seems to be a problem with updgrading the andoid sdk before the adt plugin or vice versa or what ever. anyway to solve had to:
remove all the android plugin
uninstall eclipse (if relevent and delete the whole folder)
also delete the .metadata folder in the eclipse workspace and restart the computer(always a good suggestion/
reinstall/update the android sdk
= reinstall/unzip eclipse
reinstall the ADT plugin
have fun
That's curious... I have the same problem however when I deployed my android's app that's launched in my device and for my surprise I can read the LogCat
Try seen on system device administrator if your device it's recognized by the system.
I've looked at tons of similar questions on here but all of them either had a different issue (installing the .apk actually failed) or the solutions which worked for them have not worked for me, so I apologize if this question seems like a repost.
The issue I am having is that when I try to run an android application on an emulator in eclipse the apk never gets installed. The emulator itself works fine (all the default apps function properly, settings are correct, etc.) but the app I am trying to test is never installed onto the "phone." It never shows up in the app list or launches, and I never get a confirmation that installation completed. (The run configuration is set to launch the app)
Here is the relevant console output, with some names changed:
[2011-10-19 10:54:45 - dining-android] Android Launch!
[2011-10-19 10:54:45 - dining-android] adb is running normally.
[2011-10-19 10:54:45 - dining-android] Performing <src path>.Main activity launch
[2011-10-19 10:54:45 - dining-android] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD '1.5test'
[2011-10-19 10:54:45 - dining-android] Uploading <appname>.apk onto device 'emulator-5554'
[2011-10-19 10:54:59 - dining-android] Installing <appname>.apk...
It doesn't seem to make a difference whether I start the emulator manually and then try to run the app or if I run the app and let it start the emulator automatically, it will never go past this step. I left it running for about 8 hours (overnight) and nothing at all changed. The app is designated for the same version of android as the emulator runs, and everything looks correct in the settings of the emulator and eclipse as far as I can tell, except it never completes the installation of the app.
Does anyone know why this would happen? I've tried restarting adb, using different versions of the emulator and/or app, changing the default run configuration, and various other solutions I've come across on the internet which didn't seem to have any effect whatsoever. I'd really appreciate some help on this if anyone has run into something similar.
EDIT: I just tried using the "adb install" command in the command line on the .apk of the app while the emulator was running and it was also unsuccessful. I don't know whether this is related or another issue entirely.
EDIT2: Command line install using "adb install" functions properly. However, eclipse still can't manage to install the app. Anyone know what might cause this?
I had the same issue when I tried to run my android app in a device. Eclipse went to 100% of CPU usage and it did not respond anymore. I had to kill Java processes to close eclipse every time that I ran the app. As part of the workaround I removed android plugins from eclipse, updated my android binaries in my box and installing a fresh new eclipse . I killed adb server and restarted it several times. After all of that I had the same issue.
The solution came when I tried with another phone and voilĂ ... magically the problem was gone. I had been trying with a Samsung SIII(GTI9300 - OS 4.1.2) there was some issue with that phone because when I tried with a different phone Razor-I(XT890 - OS 4.0.4) . I used other SIII(GTI9300 - OS 4.1.2) and it worked too. Maybe the solution is not the best but was effective for me. If you have no chances to change the phone I recommend you to dig out in the configs of your phone with android binaries outside of eclipse.
I hope this helps.
I had this problem before, I don't remember how I resolved it though (it was a while ago).
I personally suggest reinstalling the sdk and the ADT plugin, and make sure you're following the steps on the developer website. I'm not sure what signing the package has to do with eclipse not installing it on your phone or the emulator -- it only needs to be signed if you're going to have it up on the market (or if you're trying to install it on non-developer mode phones).
Another thing you could try is building a new android project (like a simple hello world app) and trying to install that. If it doesn't install then you're having an issue with eclipse and/or the sdk.
Also you could just completely wipe out eclipse and the sdk, and start from scratch. (Again, follow the directions on the android developer website...)
http://developer.android.com/sdk/eclipse-adt.html
http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/indigosr1
Good luck
I was fighting with same issue today.
And thanks to eplewis89, he was suggesting right things.
For me the problem was in ADT. I've updated my ASDK to highest version and ADT started to yell about it's compability and suggested to update itself too. But I chose only some parts that I thought will be enough to develop. Really this mistake cost me half of a day.
Help -> Check for Updates and update of all ADT stuff solved the problem.
I also had this issue. I tried everything I could find on the net and none of it worked for me.
It's not the solution you want to hear, but what worked for me was abandoning my Eclipse Helios install and laying down a fresh Eclipse Indigo install and then installing Android Dev Tools.
I ran into this after a crash and there was an emulator process that was still running in the background.
The solution for me was to kill adb (using ps -ef | grep adb and kill) and any running emulators (using ps -ef | grep avd and kill). Then I restarted adb:
cd /path/to/android-sdk-linux/platform-tools
./adb start-server
Go to Android\android-sdk\platform-tools in cmd and type command logcat
Then try to install the apk on the emulator again and paste the log here
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.
Before u start: I searched the google and stackoverflow, none of them gave clear answer.
Situation: I'm using Eclipse on Windows to develop Android application. So when I'm trying to run the app, the system outputs to 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 doesn't upload the .apk and doesn't start the activity. So, app is not started anyway.
I found a "solution" here, but it's unclear and seems to not work. For example, I don't know, which "emulator processed" are meant to be killed. I found adb.exe only. And that's the main point: sometimes I'm lucky enough to kill all that they wanted and start the app. But it's undetermined.
Please help, I'm completely stuck with this trouble.
I've run into this situation many times and have had to do several things to resolve the issue.
1) If DDMS is running, close it (it seems to interfere with debugging sometimes).
2) Start the emulator, try connecting with DDMS, then disconnect, then go back to eclipse and start the debuggerer.
3) Kill the emulator, kill the adb process in task manager, restart eclipse, then try debugging letting Eclipse launch the emulator, sometimes the first load of the emulator times out so when it's fully started up, start debugging again.
Overall though, I've found it is much easier to not use the emulator and use an actual device, for me it's a much faster process.
I've tried a bunch of things for Eclipse on Windows and this set-up finally worked for me. Now I can repeatedly run the emulator and deploy the app successfully:
In Run Configurations ->Select the Deployment Target Selection Mode as "Manual"
Then Hit Run. The "Android Device Chooser" shows up
Select the "Launch a new Android Virtual Device" option (this should show the AVD that you had already pre-configured)
Select the AVD there and hit Start
Check only the "Wipe User Data" and un-check the other checkboxes
Hit Launch. This should launch the emulator. Give it sometime to run. Ensure that the home screen with the Android icon (and Google search bar) shows up. It's important to wait till this shows up. Otherwise, the app won't load. Depending on how fast your CPU is, the time taken for the home screen to load will vary.
Once the emulator home screen shows, go back to Eclipse, select this emulator in the Android Device Chooser (the state should be online)
Click OK once you have selected this emulator
The app will be loaded on to the emulator (give it sometime) and you should see your app running on the emulator
This setup seemed to work for me every time. I can't fully comprehend why this works, while the other "normal" way doesn't. But I'm glad, I could get the emulator and the app working finally.
I was experiencing this issue in Linux (Mint 12, Eclipse Juno Java EE for Web Developers, Android API20, Sun Java 1.6). I could launch the emulator from the command line just fine (i.e., "emulator-arm -avd InsertYourVirtualDeviceNameHere -verbose"), but not from within Eclipse. It just hung like the original poster mentioned. The way I fixed it was to make a backup of the original "emulator" for safe keeping and then I made a copy of "emulator-arm" and renamed it "emulator". These emulators are located within the "tools" directory of your Android SDK installation. I'm still trying to figure out how to get Eclipse to correctly point to "emulator-arm" on its own without this hack.
It happened to me as well. It seemed that for me the issue was that the app was already running on the device I installed the apk to. When I closed it, it worked.
If You Running In Eclipse, Check Your Settings.
Run Configurations - Common - Select File In Standard Input And Output - Click
Workspace And Choose Your Project.