2

In this app i designed 3 activities. from the 1st activity i have 2 buttons for the other 2 activities respectively add and view. the add activity is executed but the view is not working. Thanks for any helps..

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.task.reminder"
    android:versionCode="1"
    android:versionName="1.0" >

    <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.task.reminder.TaskActivity"
            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=".View"
             android:label="@string/app_name" >>
                          </activity>
        <activity android:name=".Add"
             android:label="@string/app_name" >>
                        </activity>


    </application>

</manifest>

Any ideas...

4

1 回答 1

2

Change your View and Add Activity declaration in manifest as:

<activity android:name=".View"
     android:label="@string/app_name" />

<activity android:name=".Add"
     android:label="@string/app_name"/>

NOTE : View is already a class in Android so maybe this name will cause problem when you use Intent for starting View.java Activity. you can also change name of View.java Activity

you will also see :

Code Style Guidelines for Contributors

于 2012-12-03T15:45:38.283 回答