My new applicationactivity isnt showing up in the applications list

• You often must restart your device or emulator before a new activity shows up in the applications list. This is particularly true when it is a completely new application with a new AndroidManifest.xml file.

• If this is for a new activity in an existing AndroidManifest.xml file, did you include an <activity> tag for your app (or a <service> tag for a service, or a <receiver> tag for a receiver, etc.)?

• Make sure that your AndroidManifest.xml file is valid. Errors in attribute values, such as the value attribute in <action value="<something>"> will often not be caught by compilers, but will prevent your application from being displayed because the intent filter will not be matched. Extra spaces or other characters can often sneak into these strings.

• Did you send your .apk file to the device (adb install)?

• Run logcat on your device (adb logcat) and then install your .apk file. Check the logcat output to see whether the application is being installed and recognized properly. Here's sample output from a successful installation:

I/FileObserver( 414): *** onEvent wfd: 3 mask: 8 path: MyRSSReader.apk D/PackageManager( 414): Scanning package: /data/app/MyRSSReader.apk D/PackageManager( 414): Adding package com.example.codelab.rssexample D/PackageManager( 414): Registered content provider: my_rss_item, className = com.example.codelab.rssexample.RssContentProvider, isSyncable = false D/PackageManager( 414): Providers:

com.example.codelab.rssexample.RssContentProvider

D/PackageManager( 414): Activities: com.example.codelab.rssexample.MyRssReader com.example.codelab.rssexample.MyRssReader2

• If logcat shows that the package manager is having problems loading the manifest file, force your manifest to be recompiled by adding a space in the file and compiling it.

0 0

Post a comment