简体   繁体   English

标签<uses-permission>属性名称包含无效字符''

[英]Tag <uses-permission> attribute name has invalid character ' '

I am getting an error in manifest continiously. 我不断地在清单中得到错误。

Tried a lot but unable to fix it. 尝试了很多,但无法解决它。

Manifest : 清单:

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

    <uses-sdk
        android:minSdkVersion="17"
        android:targetSdkVersion="23" />

    <uses-permission android:name="com.example.googlemaps.permission.MAPS_RECEIVE" />

    <permission
        android:name="com.bot.pokego.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

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

    <!-- 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.bot.pokego.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

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

    <application
        android:name="com.bot.pokego.Utils.CommonForApp"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.bot.pokego.main.StartActivity"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.bot.pokego.main.AboutActivity"
            android:label="@string/app_name"
            android:launchMode="singleTop"
            android:theme="@style/AppTheme.NoActionBar" >
        </activity>

        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="AIzaSyAO9xX_OX2vwdUwPWVuPk2dHgzNpH3YKw8" />
        <!-- Include the AdActivity and InAppPurchaseActivity configChanges and themes. -->
        <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:theme="@android:style/Theme.Translucent" />
        <activity
            android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity"
            android:theme="@style/Theme.IAPTheme" />

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

        <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.bot.pokego" />
            </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.bot.pokego.firebaseinitprovider"
            android:exported="false"
            android:initOrder="100" />

        <service
            android:name="com.google.firebase.crash.internal.service.FirebaseCrashReceiverService"
            android:process=":background_crash" />
        <service
            android:name="com.google.firebase.crash.internal.service.FirebaseCrashSenderService"
            android:process=":background_crash" />

        <receiver
            android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
            android:enabled="true" >
            <intent-filter>
                <action android:name="com.google.android.gms.measurement.UPLOAD" />
            </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.bot.pokego" />

                <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>

My efforts: I tried to remove error by myself but failed again and again ! 我的努力:我试图自己删除错误但一次又一次失败!

Searched on google ....searched all possible links for it. 搜索谷歌....搜索所有可能的链接。 Any help wil be appreciated ! 任何帮助将不胜感激! Thanks in advance :) .. 提前致谢 :) ..

Problem is with debug/AndroidManifest.xml. 问题在于debug / AndroidManifest.xml。

My suspicion is that it has to do with the com.google.android.providers.gsf.permission.READ_GSERVICES permission. 我怀疑它与com.google.android.providers.gsf.permission.READ_GSERVICES权限有关。 The newer documentation does not show that it's a requirement for location stuff: https://developers.google.com/maps/documentation/android-api/location I was able to solve this issue by taking out all of the permissions and adding them one by one, rebuilding the project each time I added a permission back. 较新的文档没有显示位置内容的要求: https//developers.google.com/maps/documentation/android-api/location我能够通过取出所有权限并添加它们来解决此问题每次我添加一个权限时,一个接一个地重建项目。 The permission that gave me an issue, caused the error. 给我一个问题的权限导致了错误。 Good luck :) 祝好运 :)

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

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