简体   繁体   中英

Tag <manifest> attribute package has invalid character '; '

I have an error inside Manifest.xml, how can i fix it? My error in instant-run is the following :

Tag <manifest> attribute package has invalid character '; '

AndroidManifest.xml

   <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.yavuzoktay.challenge.challenge;"
    android:versionCode="3"
    android:versionName="1.11" >

    <uses-sdk
    android:minSdkVersion="19"
    android:targetSdkVersion="24" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <application
        android:name="com.android.tools.fd.runtime.BootstrapApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="Mobile Challenge"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.yavuzoktay.challenge.MainActivity"
            android:label="Mobile Challenge" >
            <meta-data
                android:name="android.app.searchable"
                android:resource="@xml/searchable" />
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.yavuzoktay.challenge.AlbumActivity"
            android:label="Album"
            android:parentActivityName="com.yavuzoktay.challenge.MainActivity" />
    </application>

</manifest>

My error: 在此处输入图片说明

Your advice is important for me!

Thank you very much!

Somewhat self-explanatory ...

package="com.yavuzoktay.challenge.challenge;"

should be

package="com.yavuzoktay.challenge.challenge"

Remove the semicolon.

EDIT: Do this in the file main/AndroidManifest.xml and for every AndroidManifest.xml that you might have for build flavors like debug/AndroidManifest.xml . Leave all AndroidManifest.xml files alone that are under the build folder. Those are automatically generated and shouldn't be edited.

modify for your tag package to

package="com.yavuzoktay.challenge.challenge"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM