Android app does not always launch on emulator - android

I'm using the Android Emulator and the Eclipse ADT. Something odd keeps happening. About 10% of the times I try running the app, it uploads the app to the emulator, installs it, gets success and says starting activity on emulator, but I don't get this line
ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
then nothing else happens and the app doesn't start. Then I just run the app again, it says already installed and it runs perfectly. This happens occasionally, but of course it doesn't cause me any problems, I simply run it again and it works, but I was wondering if this happens to others as well? Is there any solution?
Below is what appears in the console for a fail app launch and a following successful launch, as you can see the Starting Intent line is missing in the first and present in the second.
[2014-06-05 14:38:13 - TradeApp] ------------------------------
[2014-06-05 14:38:13 - TradeApp] Android Launch!
[2014-06-05 14:38:13 - TradeApp] adb is running normally.
[2014-06-05 14:38:13 - TradeApp] Performing com.example.tradeapp.MainActivity activity launch
[2014-06-05 14:38:13 - TradeApp] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'GoogleAPI_4.4.2'
[2014-06-05 14:38:13 - TradeApp] Uploading TradeApp.apk onto device 'emulator-5554'
[2014-06-05 14:38:17 - TradeApp] Installing TradeApp.apk...
[2014-06-05 14:38:35 - TradeApp] Success!
[2014-06-05 14:38:36 - TradeApp] Starting activity com.example.tradeapp.MainActivity on device emulator-5554
[2014-06-05 14:44:06 - TradeApp] ------------------------------
[2014-06-05 14:44:06 - TradeApp] Android Launch!
[2014-06-05 14:44:06 - TradeApp] adb is running normally.
[2014-06-05 14:44:06 - TradeApp] Performing com.example.tradeapp.MainActivity activity launch
[2014-06-05 14:44:06 - TradeApp] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'GoogleAPI_4.4.2'
[2014-06-05 14:44:09 - TradeApp] Application already deployed. No need to reinstall.
[2014-06-05 14:44:09 - TradeApp] Starting activity com.example.tradeapp.MainActivity on device emulator-5554
[2014-06-05 14:44:11 - TradeApp] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.tradeapp/.MainActivity }

yes some times aplication dont start this problam when come android ddms have error or emulator is timeout when start application
try use lower API for emulator

Related

Eclipse Console Not Showing Logs

This may not be a programming question. But any help will be appreciated.
When I launch my android application in emulator, I used to get some kind of log message on console. Like below:
[2014-09-01 18:56:44 - POSStore] ------------------------------
[2014-09-01 18:56:44 - POSStore] Android Launch!
[2014-09-01 18:56:44 - POSStore] adb is running normally.
[2014-09-01 18:56:44 - POSStore] Performing com.POS.Store.LoginActivity activity launch
[2014-09-01 18:56:45 - POSStore] Automatic Target Mode: Preferred AVD 'SamsungGalaxyS' is not available. Launching new emulator.
[2014-09-01 18:56:45 - POSStore] Launching a new emulator with Virtual Device 'SamsungGalaxyS'
[2014-09-01 18:56:54 - POSStore] New emulator found: emulator-5554
[2014-09-01 18:56:54 - POSStore] Waiting for HOME ('android.process.acore') to be launched...
[2014-09-01 18:57:28 - POSStore] HOME is up on device 'emulator-5554'
[2014-09-01 18:57:28 - POSStore] Uploading POSStore.apk onto device 'emulator-5554'
[2014-09-01 18:57:28 - POSStore] Installing POSStore.apk...
[2014-09-01 18:57:43 - POSStore] Success!
[2014-09-01 18:57:43 - POSStore] Starting activity com.POS.Store.LoginActivity on device emulator-5554
[2014-09-01 18:57:44 - POSStore] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.POS.Store/.LoginActivity }
[2014-09-01 18:57:45 - POSStore] Attempting to connect debugger to 'com.POS.Store' on port 8626
But suddenly console stopped showing logs. But application is launched successfully and running.
Why does console stopped showing application logs? I've updated my android version. Does this afects?
Go to Display Selected Console drop down on top right side of your console window. And select Android.

Android Application (Network Unavailable) & LogCat won't show anything

I was testing my blog reader application at my friends house (on my laptop) and it connected to the network and the parsing of all the JSON worked great. As soon as I get home I go to test it and it can't seem to connect to a Network. My laptop is connected to my internet (no issues with browsing internet) and my emulator does not have airplane mode on.
Also apparently my LogCat decided to go on vacation because it is not outputting ANY info at all.
the console has been outputting this
[2013-08-29 19:43:24 - BlogReader] Android Launch!
[2013-08-29 19:43:24 - BlogReader] adb is running normally.
[2013-08-29 19:43:24 - BlogReader] Performing com.practice.blogreader.MainListActivity activity launch
[2013-08-29 19:43:25 - BlogReader] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'Nexus_4_Emulator'
[2013-08-29 19:43:26 - BlogReader] Application already deployed. No need to reinstall.
[2013-08-29 19:43:26 - BlogReader] Starting activity com.practice.blogreader.MainListActivity on device emulator-5554
[2013-08-29 19:43:27 - BlogReader] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.practice.blogreader/.MainListActivity }
[2013-08-29 19:43:27 - BlogReader] ActivityManager: Warning: Activity not started, its current task has been brought to the front
Even though the only thing that is displayed on the emulator is the application.
Any Ideas?

application was not shown in emulator

this is the problem i'm geting guys...my application was not shown in emulator...
wat to do guys
Android Launch!
[2013-08-30 11:00:27 - Resturent1] adb is running normally.
[2013-08-30 11:00:27 - Resturent1] No Launcher activity found!
[2013-08-30 11:00:27 - Resturent1] The launch will only sync the application package on the device!
[2013-08-30 11:00:27 - Resturent1] Performing sync
[2013-08-30 11:00:28 - Resturent1] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'kamal'
[2013-08-30 11:00:28 - Resturent1] Uploading Resturent1.apk onto device 'emulator-5554'
[2013-08-30 11:00:32 - Resturent1] Installing Resturent1.apk...
[2013-08-30 11:00:40 - Resturent1] Success!
[2013-08-30 11:00:40 - Resturent1] \Resturent1\bin\Resturent1.apk installed on device
No Launcher activity found! Have you declared Activity with action:Main and category:Launcher in your Android Manifest File.

Why is the emulator in eclipse restarting?

I am following http://developer.android.com/training/basics/firstapp/running-app.html
and trying to run my first android app on the emulator on my PC.
The emulator is running (started from eclipse)
I managed to lauch myFirst App via eclipse as described, although in this tutorial it should be added you have to wait minutes before the emulator is up and running.
Now my problem is that when I modify myFirstApp, and wnat to test it, that eclipse keeps starting a new emulator:
[2012-10-15 19:32:44 - MyFirstApp] ------------------------------
[2012-10-15 19:32:44 - MyFirstApp] Android Launch!
[2012-10-15 19:32:44 - MyFirstApp] adb is running normally.
[2012-10-15 19:32:45 - MyFirstApp] Performing com.example.myfirstapp.MainActivity activity launch
[2012-10-15 19:32:45 - MyFirstApp] Automatic Target Mode: Preferred AVD 'Hobbit' is not available. Launching new emulator.
[2012-10-15 19:32:45 - MyFirstApp] Launching a new emulator with Virtual Device 'Hobbit'
This is extremely annoying, because of the performance penalty to launch a complete emulator.
But what is even more frustrating that I get back the very first version of MyFirstApp in this new emulator.
When I restart myself the emulator from scratch I see this in the console:
[2012-10-15 19:55:42 - MyFirstApp] New emulator found: emulator-5554
[2012-10-15 19:55:42 - MyFirstApp] Waiting for HOME ('android.process.acore') to be launched...
[2012-10-15 19:56:57 - MyFirstApp] emulator-5554 disconnected! Cancelling 'com.example.myfirstapp.MainActivity activity launch!'
Why? The emulator is still running at this point. This cannot be the normal way of working. Can anybody help me out?
Go to Run -> Run Configuration in eclipse. Select your application and update the target tab at right side to "Always prompt to pick device"
If the emulator is running and doesnt show in Devices then try to reset adb.
In eclipse: Device tab-> Dropbown - > reset abd

Could not find gridlayout_v7.apk

I'm trying to make my app switch between two activities with buttons. The first activity comes up and I can click on the button, but then a notification pops up that says "Unfortunately, projectname has stopped."
This is the error that comes up on the console:
[2012-10-18 09:54:46 - gridlayout_v7] Could not find gridlayout_v7.apk!
This is what the rest of the console posts:
[2012-10-18 09:54:38 - PersonalLibrary] Android Launch!
[2012-10-18 09:54:38 - PersonalLibrary] adb is running normally.
[2012-10-18 09:54:38 - PersonalLibrary] Performing com.balaka.personallibrary.LibraryMenu activity launch
[2012-10-18 09:54:38 - PersonalLibrary] Automatic Target Mode: Preferred AVD 'test' is available on emulator 'emulator-5554'
[2012-10-18 09:54:38 - PersonalLibrary] Uploading PersonalLibrary.apk onto device 'emulator-5554'
[2012-10-18 09:54:39 - PersonalLibrary] Installing PersonalLibrary.apk...
[2012-10-18 09:54:46 - PersonalLibrary] Success!
[2012-10-18 09:54:46 - gridlayout_v7] Could not find gridlayout_v7.apk!
[2012-10-18 09:54:46 - PersonalLibrary] Starting activity com.balaka.personallibrary.LibraryMenu on device emulator-5554
[2012-10-18 09:54:48 - PersonalLibrary] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.balaka.personallibrary/.LibraryMenu }
I've tried to find answers others places online but there is no mention of the file.
According to this answer, you need to remove the project dependency to gridlayout_v7 and add the dependency to gridlayout_v7 as an "Android" dependency in project properties. That solved the problem for me.

Categories

Resources