我一直在尝试打开现有的Android项目,但我的Android Manifest上出现错误:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.one.piano"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
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.evilduck.piano.PianoDemoActivity"
android:label="@string/app_name" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
错误是:
错误:(25,-1)Android资源打包:[custom_view_keyboard-master] C:\ Users \ user \ Desktop \ oneapp.idea \ AndroidManifest.xml:25:错误:解析XML时出错:标记不匹配
这似乎是最后一行的最后一个“活动”。
编辑:
值 - &GT;字符串:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Piano Showcase</string>
<string name="action_settings">Settings</string>
<string name="remove">Remove</string>
<string name="scale">Scale</string>
</resources>
答案 0 :(得分:1)
从活动代码中删除/添加/动作代码 所以它看起来像:
<activity
android:name="com.evilduck.piano.PianoDemoActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
答案 1 :(得分:0)
试试这个
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.one.piano"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
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.evilduck.piano.PianoDemoActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>