简体   繁体   English

标签 <manifest> 属性包中包含无效字符&#39;; “

[英]Tag <manifest> attribute package has invalid character '; '

I have an error inside Manifest.xml, how can i fix it? 我在Manifest.xml中出现错误,该如何解决? My error in instant-run is the following : 我在即时运行中的错误如下:

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

AndroidManifest.xml 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 . 编辑:在文件执行此main/AndroidManifest.xml ,并为每一个AndroidManifest.xml ,你可能对构建口味像debug/AndroidManifest.xml Leave all AndroidManifest.xml files alone that are under the build folder. 将所有AndroidManifest.xml文件放在build文件夹下。 Those are automatically generated and shouldn't be edited. 它们是自动生成的,不应进行编辑。

modify for your tag package to 修改您的标签包以

package="com.yavuzoktay.challenge.challenge" package =“ com.yavuzoktay.challenge.challenge”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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