2

I'm developing an application for the Android platform targeted for api level 4 (Android 1.6) but I can't get it to show up on my phone and I can't figure out why. Here's my AndroidManifest.xml is there a problem in here? Or is there something else I should be looking at?

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.sbe.app.hellocogen"
          android:versionCode="1"
          android:versionName="1.0">
            <uses-permission android:name="android.permission.INTERNET" />
        <application android:icon="@drawable/icon" android:label="@string/app_name">
                <activity android:name=".activity.ListPlants"
                        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=".activity.AddPlant"
                        android:label="Add Plant">
                    <intent-filter>
                        <action android:name="android.intent.action.VIEW"/>
                        <category android:name="android.intent.category.DEFAULT"/>
                    </intent-filter>
                </activity>
                <activity android:name=".activity.UnitActivity"
                        android:label="IP HERE, PLANT NAME">
                    <intent-filter>
                        <action android:name="android.intent.action.VIEW"/>
                        <category android:name="android.intent.category.DEFAULT"/>
                    </intent-filter>
                </activity>
        </application>
        <uses-sdk android:minSdkVersion="4"/>
    </manifest> 

When I started this application it didn't show up but I fixed it by setting the minimum api level to 4 instead of 7 then it started showing up but now it stopped showing up again and I don't know why.

NightWatchman
  • 1,217
  • 5
  • 17
  • 25
  • 2
    Don't know if this is the problem, but having an activity with an intent filter for `ACTION_VIEW` without any mimetype constraints is wonky. Try removing everything but the launcher activity. Also, have does `aapt` throw any errors? – Roman Nurik Jun 08 '10 at 05:04
  • I would double/triple check your main activity, make sure the class is ListPlants and that it's in the package: com.sbe.app.hellocogen.activity. These type of problems are usually related to properly setting the android:name attribute – Ricardo Villamil Jun 08 '10 at 15:55
  • Thanks for the help. I removed all my activities from the manifest except my main activity (ListPlants) and checked to make sure com.sbe.app.hellocogen.activity.ListPlants was the correct class but it still doesn't show up. – NightWatchman Jun 08 '10 at 19:37

1 Answers1

3

I was having the exact same problem as you. It was working for one activity but not another. Eventually I realised that I had named the tag "activty" instead of "activity". This doesn't throw an error of any kind, just does not recognise the existence of the Activity!

Also, you don't need the ".activity." before the class name. Is your "ListPlants" a ListActivity? If so, this might explain your problem.

ShibbyUK
  • 1,501
  • 9
  • 12