Android emulator not loading an app - android

Whenever I try to run an app on the Android emulator, from the eclipse in the adt bundle, the emulator loads and the console outputs this:
[2013-06-18 06:34:02 - Counter] No Launcher activity found!
[2013-06-18 06:34:02 - Counter] The launch will only sync the application package on the device!
[2013-06-18 06:34:02 - Counter] Performing sync
[2013-06-18 06:34:02 - Counter] Automatic Target Mode: launching new emulator with compatible AVD 'Anroid_emulator'
[2013-06-18 06:34:02 - Counter] Launching a new emulator with Virtual Device 'Anroid_emulator'
[2013-06-18 06:34:03 - Counter] New emulator found: emulator-5554
[2013-06-18 06:34:03 - Counter] Waiting for HOME ('android.process.acore') to be launched...
[2013-06-18 06:34:37 - Counter] HOME is up on device 'emulator-5554'
[2013-06-18 06:34:37 - Counter] Uploading Counter.apk onto device 'emulator-5554'
[2013-06-18 06:34:37 - Counter] Installing Counter.apk...
[2013-06-18 06:35:12 - Counter] Success!
[2013-06-18 06:35:12 - Counter] \Counter\bin\Counter.apk installed on device
[2013-06-18 06:35:12 - Counter] Done!

Have you checked whether your app has been installed or not by going inside the menu?
Because if you have forgotten to make your activity as the launcher activity, your app will not pop up and you may not notice that your app has already been installed.
You can make that activity as launcher in the manifest by the below given tags:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.LAUNCHER" />

I think you seem to be missing these in your manifest XML for the Activity that is the app's primary:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
For example, if your main activity is called MainActivity, it should look like this:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/FooDzines" >
<activity
android:name="MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
....
....
</application>

Related

Android Application open from browser No Launcher activity found

Trying to run my application from browser with scheme but getting below logs if i add scheme it show below log and unable to launch app.
[2015-11-18 04:49:50 - app] ------------------------------
[2015-11-18 04:49:50 - app] Android Launch!
[2015-11-18 04:49:50 - app] adb is running normally.
[2015-11-18 04:49:50 - app] No Launcher activity found!
[2015-11-18 04:49:50 - app] The launch will only sync the application package on the device!
[2015-11-18 04:49:50 - app] Performing sync
[2015-11-18 04:49:50 - app] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'Nexus_S_API_17'
[2015-11-18 04:49:52 - app] Application already deployed. No need to reinstall.
[2015-11-18 04:49:52 - app] \app\bin\app.apk installed on device
[2015-11-18 04:49:52 - app] Done!
My AndroidManifest.xml as below
<activity
android:name="com.holidaynumbers.MainActivity"
android:label="#string/app_name"
android:configChanges="orientation|screenSize|keyboardHidden"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="allplayer" />
</intent-filter>
</activity>
Tried many different ways to run application with launcher but not able to run it and can't see app icon in apps
try to separate intent filter:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="allplayer" />
</intent-filter>

emulator is not launching my project

[2013-03-19 08:52:49 - GEARS] Performing sync
[2013-03-19 08:52:50 - GEARS] Automatic Target Mode: launching new emulator with compatible AVD 'sdfs'
[2013-03-19 08:52:50 - GEARS] Launching a new emulator with Virtual Device 'sdfs'
[2013-03-19 08:52:54 - GEARS] ------------------------------
[2013-03-19 08:52:54 - GEARS] Android Launch!
[2013-03-19 08:52:54 - GEARS] adb is running normally.
[2013-03-19 08:52:54 - GEARS] No Launcher activity found!
[2013-03-19 08:52:54 - GEARS] The launch will only sync the application package on the device!
[2013-03-19 08:52:54 - GEARS] Performing sync
[2013-03-19 08:52:54 - GEARS] Automatic Target Mode: launching new emulator with compatible AVD 'sdfs'
[2013-03-19 08:52:54 - GEARS] Launching a new emulator with Virtual Device 'sdfs'
I'm making an android app and after editing it I encounter this problem. It has no errors but it doesn't launch either. Is my problem with my manifest or launch activity?
Updated Manifest:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.bpi.gears.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.main" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.bpi.gears.home"
android:label="#string/title_activity_home" >
</activity>
<activity
android:name="com.bpi.gears.profile"
android:label="#string/title_activity_profile" >
</activity>
</application>
</manifest>
I still can't run my app.
You have the same activity defined twice. remove this and try:
<activity
android:name="com.bpi.gears.MainActivity"
android:label="#string/app_name" >
</activity>
You have this in your manifest:
<action android:name="android.intent.action.main" />
It needs to be like this:
<action android:name="android.intent.action.MAIN" />
you have main instead of MAIN

Android App Runs in Emulator, But Not Listed In Launcher

I am learning Android and can not get my program to show up in the program listings drawer of my Nexus S emulated device. When I load up the emulator, it does load my program successfully, after hitting "run new configuration". I know there are a ton of threads on this...but from what I can tell I have everything right in my manifest with:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Also, to be clear the run configuration in Eclipse does run my program successfully. It's just not in the apps menu/drawer of the emulated device to click and run:
[2013-03-07 20:14:04 - TodDoList] New emulator found: emulator-5554
[2013-03-07 20:14:04 - TodDoList] Waiting for HOME ('android.process.acore') to be launched...
[2013-03-07 20:14:46 - TodDoList] HOME is up on device 'emulator-5554'
[2013-03-07 20:14:46 - TodDoList] Uploading TodDoList.apk onto device 'emulator-5554'
[2013-03-07 20:14:47 - TodDoList] Installing TodDoList.apk...
[2013-03-07 20:15:23 - TodDoList] Success!
[2013-03-07 20:15:23 - TodDoList] Starting activity com.paad.toddolist.ToDoListActivity on device emulator-5554
[2013-03-07 20:15:24 - TodDoList] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.paad.toddolist/.ToDoListActivity }
Here is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.paad.toddolist"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="15" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.paad.toddolist.ToDoListActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Here is my strings.xml file:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">TodDoList</string>
<string name="addItemHint">New To Do List</string>
<string name="addItemContentDescription">New To Do Item</string>
</resources>
Try replacing
android:name="com.paad.toddolist.ToDoListActivity"
with
android:name=".ToDoListActivity"

app is installed but not launching on my emulator

In my emulator app installed successfully but app is not launching ,here i am pasting the console details
here i am adding manifest file as well ,i added intent-filter as well.
i hope this info is enough but stackoverflow needs some more info .
[2012-12-13 20:29:52 - PongUr2] Android Launch!
[2012-12-13 20:29:52 - PongUr2] adb is running normally.
[2012-12-13 20:29:52 - PongUr2] No Launcher activity found!
[2012-12-13 20:29:52 - PongUr2] The launch will only sync the application package on the device!
[2012-12-13 20:29:52 - PongUr2] Performing sync
[2012-12-13 20:29:52 - PongUr2] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'AVD_4.0'
[2012-12-13 20:29:52 - PongUr2] Uploading PongUr2.apk onto device 'emulator-5554'
[2012-12-13 20:29:53 - PongUr2] Installing PongUr2.apk...
[2012-12-13 20:30:00 - PongUr2] Success!
[2012-12-13 20:30:01 - PongUr2] \PongUr2\bin\PongUr2.apk installed on device
[2012-12-13 20:30:01 - PongUr2] Done!
HereÅ› the xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sabrebutt.pongur"
android:versionCode="49"
android:versionName="0.8.8.2" >
<application
android:icon="#drawable/icon"
android:label="#string/app_name" >
<service
android:name="PongUr"
android:enabled="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:permission="android.permission.BIND_WALLPAPER" >
<intent-filter android:priority="1" >
<action android:name="android.service.wallpaper.WallpaperService" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</intent-filter>
<meta-data
android:name="android.service.wallpaper"
android:resource="#xml/pongur" />
</service>
<activity
android:name="PongUrSettings"
android:exported="true"
android:label="#string/pongur_settings"
android:theme="#android:style/Theme.Black" >
</activity>
</application>
<uses-sdk android:minSdkVersion="7" />
/>
</manifest>
None of your activities have launcher intent filter, Add below lines to the activity you want to launch in your manifest
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Edit:
You cannot have an intentfilter inside an intentFilter and the launcher intent filter will not work on service, only Activities can be launched and can have UI
<activity
android:name="PongUrSettings"
android:exported="true"
android:label="#string/pongur_settings"
android:theme="#android:style/Theme.Black" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Try going Setting -> Application(apps) --> uninstall your app & run again your app . May be it should work.Sometimes previous installation creates this type problem.Otherwise may be problem with your menifest file.
Not specific to this particular error. When app is installed and not launched, you can check the 'Launch options' in 'Run Configuration'. It should be selected as 'Default Activity'.

android not launching correct activity

I'm not really sure what's going on, but for some reason my SplashActivity is not being created on launch, even though I put the MAIN and LAUNCHER intent for it. Here's my manifest:
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".SplashActivity"
android:label="#string/title_activity_main"
android:theme="#style/Theme.Splash" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="whatever" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
If I remove the second activity, then my SplashActivity is launched. But for some reason when the MainActivity is included, the Splash is ignored. Is it possible that having the activity name be MainActivity overrides whatever you set for your Launcher activity?
Update:
It seems everybody is suggesting something that I had already tried before posting this question so I think it's better I mention it now before more people post the same suggestion :)
Unfortunately removing the intent on the MainActivity results in the following in my Console output:
[2012-10-11 22:58:44 - Test] ------------------------------
[2012-10-11 22:58:44 - Test] Android Launch!
[2012-10-11 22:58:44 - Test] adb is running normally.
[2012-10-11 22:58:44 - Test] Performing com.test.test.MainActivity activity launch
[2012-10-11 22:58:44 - Test] Automatic Target Mode: using device '9a03c386'
[2012-10-11 22:58:45 - Test] Application already deployed. No need to reinstall.
[2012-10-11 22:58:45 - Test] Starting activity com.test.test.MainActivity on device 9a03c386
[2012-10-11 22:58:45 - Test] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.test.test/.MainActivity }
[2012-10-11 22:58:45 - Test] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.test.test/.MainActivity } from null (pid=12510, uid=2000) not exported from uid 10132
[2012-10-11 22:58:45 - Test] ActivityManager: at android.os.Parcel.readException(Parcel.java:1327)
[2012-10-11 22:58:45 - Test] ActivityManager: at android.os.Parcel.readException(Parcel.java:1281)
[2012-10-11 22:58:45 - Test] ActivityManager: at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1728)
[2012-10-11 22:58:45 - Test] ActivityManager: at com.android.commands.am.Am.runStart(Am.java:433)
[2012-10-11 22:58:45 - Test] ActivityManager: at com.android.commands.am.Am.run(Am.java:107)
[2012-10-11 22:58:45 - Test] ActivityManager: at com.android.commands.am.Am.main(Am.java:80)
[2012-10-11 22:58:45 - Test] ActivityManager: at com.android.internal.os.RuntimeInit.finishInit(Native Method)
[2012-10-11 22:58:45 - Test] ActivityManager: at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:263)
[2012-10-11 22:58:45 - Test] ActivityManager: at dalvik.system.NativeStart.main(Native Method)
Don't know what it means, but I have to assume it's some kind of error.
The section
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
is used to let android know which activity to start when application starts.. Since you wrote it inside both of your activity, android takes second one as the starting activity..
So remove that line from .MainActivity block..
<activity
android:name=".SplashActivity"
android:label="#string/title_activity_main"
android:theme="#style/Theme.Splash" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="whatever" >
</activity>
After Seeing OP's edit
Have you seen this? Also after changing AndroidManifest.xml file, delete and reinstall the app once..
try this
<activity
android:name=".SplashActivity"
android:label="#string/title_activity_main"
android:theme="#style/Theme.Splash" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="whatever" >
</activity>
try this :
<activity
android:name="SplashScreen"
android:theme="#style/Theme.Transparent"
android:screenOrientation="landscape"
>
<intent-filter>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>
</activity>
and give me review...................

Categories

Resources