Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top