簡體   English   中英

錯誤:(20)標簽 <uses-permission> 屬性名稱包含無效字符&#39;&#39;

[英]Error:(20) Tag <uses-permission> attribute name has invalid character ' '

我正在處理我的代碼,但遇到此錯誤,我嘗試搜索但未能使其正常工作……我已經嘗試了很多,但在讀寫存儲權限下卻遇到此錯誤,該錯誤包含無效字符'' ,我的許多代碼突然變成紅色。 它甚至從manifestxmlns:android="http://schemas.android.com/apk/res/android"行開始,但未在此處指出錯誤。 有任何想法嗎?

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.biteme.biteme"
    android:versionCode="1"
    android:versionName="1.0" >

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

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.Write_EXTERNAL_STORAGE " />

    <!-- Optional permission for Analytics to run. -->
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

    <permission
        android:name="com.biteme.biteme.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.biteme.biteme.permission.C2D_MESSAGE" />

    <application
        android:name="com.biteme.biteme.hashkey"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" >
        <meta-data
            android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/app_id" />
        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_maps_key" />

        <activity
            android:name="com.biteme.biteme.MainActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme.NoActionBar" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
>
        </activity>
        <activity
            android:name="com.biteme.biteme.Splashscreen"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

        <activity
            android:name="com.biteme.biteme.MapsActivity"
            android:label="BiteMe map"
            android:screenOrientation="portrait" />
        <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.Translucent" />
        <activity
            android:name="com.facebook.FacebookActivity"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:theme="@style/com_facebook_activity_theme" />
        <activity
            android:name="com.facebook.CustomTabActivity"
            android:exported="true" >
        </activity>
        <activity android:name="com.facebook.CustomTabMainActivity" />
        <activity
            android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity"
            android:theme="@style/Theme.IAPTheme" />
        <activity
            android:name="com.google.android.gms.common.api.GoogleApiActivity"
            android:exported="false"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
        <activity
            android:name="com.google.android.gms.appinvite.PreviewActivity"
            android:exported="true"
            android:theme="@style/Theme.AppInvite.Preview" >
            <intent-filter>
                <action android:name="com.google.android.gms.appinvite.ACTION_PREVIEW" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
            android:excludeFromRecents="true"
            android:exported="false"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
        <!--
Service handling Google Sign-In user revocation. For apps that do not integrate with
            Google Sign-In, this service will never be started.
        -->
        <service
            android:name="com.google.android.gms.auth.api.signin.RevocationBoundService"
            android:exported="true"
            android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />

        <receiver android:name="com.google.android.gms.cast.framework.media.MediaIntentReceiver" />

        <service android:name="com.google.android.gms.cast.framework.media.MediaNotificationService" />
        <service android:name="com.google.android.gms.cast.framework.ReconnectionService" />

        <receiver
            android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
            android:exported="true"
            android:permission="com.google.android.c2dm.permission.SEND" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />

                <category android:name="com.biteme.biteme" />
            </intent-filter>
        </receiver>
        <!--
 Internal (not exported) receiver used by the app to start its own exported services
             without risk of being spoofed.
        -->
        <receiver
            android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
            android:exported="false" />
        <!--
 FirebaseInstanceIdService performs security checks at runtime,
             no need for explicit permissions despite exported="true"
        -->
        <service
            android:name="com.google.firebase.iid.FirebaseInstanceIdService"
            android:exported="true" >
            <intent-filter android:priority="-500" >
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
            </intent-filter>
        </service>

        <provider
            android:name="com.google.firebase.provider.FirebaseInitProvider"
            android:authorities="com.biteme.biteme.firebaseinitprovider"
            android:exported="false"
            android:initOrder="100" />

        <receiver
            android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
            android:enabled="true"
            android:exported="false" >
        </receiver>
        <receiver
            android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"
            android:enabled="true"
            android:permission="android.permission.INSTALL_PACKAGES" >
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER" />
            </intent-filter>
        </receiver>

        <service
            android:name="com.google.android.gms.measurement.AppMeasurementService"
            android:enabled="true"
            android:exported="false" />
        <!--
 FirebaseMessagingService performs security checks at runtime,
             no need for explicit permissions despite exported="true"
        -->
        <service
            android:name="com.google.firebase.messaging.FirebaseMessagingService"
            android:exported="true" >
            <intent-filter android:priority="-500" >
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>
        <service
            android:name="com.google.android.gms.tagmanager.TagManagerService"
            android:enabled="true"
            android:exported="false" />

        <activity
            android:name="com.google.android.gms.tagmanager.TagManagerPreviewActivity"
            android:noHistory="true" > <!-- optional, removes the previewActivity from the activity stack. -->
            <intent-filter>
                <data android:scheme="tagmanager.c.com.biteme.biteme" />

                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
            </intent-filter>
        </activity>
    </application>

</manifest>

您在</intent-filter></activity> >之間有一個多余的> ,可能是您意外輸入的。

錯誤實際上是關於<uses-permission android:name="android.permission.Write_EXTERNAL_STORAGE " /> ,最后您有多余的空格字符。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM