新建有两个Activity用于两个Activity之间简单的切换,java文件跟xml文件都没问题了,就是在Androidmanifest中声明使用IntentTestActivity和AnotherActivity出问题
代码如下:
<?xml version="1.0" encoding="utf-8"?>
package="com.example.intenttest"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".IntentTestActivity"
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=".AnotherActivity"
<intent-filter>//这里报错,Error parsing XML:not well-formed (invalid token)
<action android:name="android.guo.action.anotheractivity" />
</intent-filter>
</activity>
</application>