Reputation: 81
I've been trying to open an existing Android project but I get an error on its 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>
The error is:
Error:(25, -1) Android Resource Packaging: [custom_view_keyboard-master] C:\Users\user\Desktop\oneapp.idea\AndroidManifest.xml:25: error: Error parsing XML: mismatched tag
Which seems to be on the last "activity" on the previous line of the last.
edit:
values->string:
<?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>
Upvotes: 1
Views: 517
Reputation: 27515
try this
<?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>
Upvotes: 0
Reputation: 3316
Remove / from activity tag, and add / action tag So it looks like:
<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>
Upvotes: 1