我有两个活动,我从mainactivity调用第二个活动(Menu)。现在可能是令人困惑的菜单与android.view.menu我一直得到以下错误
11-04 08:05:39.225: E/AndroidRuntime(2845): android.content.ActivityNotFoundException: Unable to find explicit activity class {info.saltnpepper.ordersmart2/android.view.Menu}; have you declared this activity in your AndroidManifest.xml?
我的androidmanifest如下
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".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="info.saltnpepper.ordersmart2.Menu"></activity>
</application>
答案 0 :(得分:0)
请将菜单名称更改为MenuActivity。最好使用Refactor-&gt;重命名,以便同时重命名所有实例