ERROR获取'name'属性:attribute不是字符串值

A. *_*han 14 android android-manifest

将我的apk文件上传到google play会出现此错误:

您的APK无法使用aapt进行分析.错误输出:无法运行aapt转储标记:ERROR获取'name'属性:attribute不是字符串值

因为我知道这个问题在我的清单文件中,所以我把它放在这里:

AndroidManifext.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="ir.altontech.newsimpay">

    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

    <permission
        android:name="ir.altontech.newsimpay.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <uses-permission android:name="ir.altontech.newsimpay.permission.C2D_MESSAGE" />

    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />

    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />

    <application xmlns:tools="http://schemas.android.com/tools"
        android:name="ir.altontech.newsimpay.Classes.Model.AnalyticsApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="false"
        android:theme="@style/AppTheme"
        tools:replace="android:supportsRtl">

        <receiver
            android:name="com.adjust.sdk.AdjustReferrerReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER" />
            </intent-filter>
        </receiver>

        <receiver android:name=".Receivers.SmsListener">
            <intent-filter android:priority="1000">
                <action android:name="android.provider.Telephony.SMS_RECEIVED" />
            </intent-filter>
        </receiver>

        <receiver
            android:name="com.google.android.gms.analytics.AnalyticsReceiver"
            android:enabled="true">
            <intent-filter>
                <action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
            </intent-filter>
        </receiver>

        <service
            android:name="com.google.android.gms.analytics.AnalyticsService"
            android:enabled="true"
            android:exported="false" />

        <activity
            android:name="ir.altontech.newsimpay.Activities.Introduction"
            android:screenOrientation="portrait" />
        <activity
            android:name="ir.altontech.newsimpay.Activities.Main"
            android:launchMode="singleTask"
            android:screenOrientation="portrait"
            android:taskAffinity="ir.altontech.simpay"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="adjustPan"/>

        <activity
            android:name=".Activities.SpecificPage"
            android:screenOrientation="portrait">
            <intent-filter>
                <data
                    android:host="ir.altontech.simpay.specific"
                    android:scheme="simpay" />
                <data
                    android:host="ad.simpay.ir"
                    android:scheme="http" />

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

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

        <activity
            android:name=".Activities.SplashActivity"
            android:launchMode="singleTask"
            android:screenOrientation="portrait"
            android:taskAffinity="ir.altontech.simpay"
            android:theme="@style/AppTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <activity
            android:name=".Activities.FastCharge"
            android:launchMode="singleInstance"
            android:screenOrientation="portrait"
            android:taskAffinity="ir.altontech.simpay"
            android:theme="@style/fast_charge_theme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
            </intent-filter>
        </activity>

        <activity android:name="ir.altontech.newsimpay.Activities.BarcodeScanner" />
        <activity
            android:name="ir.altontech.newsimpay.Activities.FinalTrainTicket"
            android:screenOrientation="landscape" />
        <activity
            android:name="ir.altontech.newsimpay.Activities.VideoPlayer"
            android:screenOrientation="landscape"
            android:taskAffinity="ir.altontech.simpay" />
        <activity android:name="ir.altontech.newsimpay.Activities.CallBack">
            <intent-filter>
                <data
                    android:host="ir.altontech.simpay.callback"
                    android:scheme="simpay" />

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

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

        <service
            android:name=".Classes.Services.GCMService"
            android:exported="false" />

        <receiver
            android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER" />
            </intent-filter>
        </receiver>

        <service
            android:name="com.google.android.gms.analytics.CampaignTrackingService"
            android:enabled="true"
            android:exported="false" />

        <!-- services -->

        <!-- registration process service -->
        <service
            android:name="ir.altontech.cloudmessaging.core.registrationprocess.RegistrationProcessService"
            android:exported="false">
            <intent-filter>
                <action android:name="co.shariftech.pushnotification.intent.action.START_PUSH_NOTIFICATION_SERVICE" />
            </intent-filter>
        </service>

        <!-- registration process token refresher service -->
        <service
            android:name="ir.altontech.cloudmessaging.core.registrationprocess.RegistrationProcessTokenRefresherService"
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.android.gms.iid.InstanceID" />
            </intent-filter>
        </service>

        <!-- push notification service -->
        <service
            android:name="ir.altontech.cloudmessaging.core.pushnotification.PushNotificationService"
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            </intent-filter>
        </service>

        <!-- receivers -->

        <!-- google cloud messaging receiver -->
        <receiver
            android:name="com.google.android.gms.gcm.GcmReceiver"
            android:exported="true"
            android:permission="com.google.android.c2dm.permission.SEND">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <category android:name="ir.altontech.newsimpay" />
            </intent-filter>
        </receiver>

    </application>

</manifest>
Run Code Online (Sandbox Code Playgroud)

我检查了所有android:name属性,但找不到问题.谢谢你们.

Adn*_*aki 1

从谷歌检查这个链接

      android:name="string"
Run Code Online (Sandbox Code Playgroud)

该文档说,您的android:nameelement 语法应该是String

我认为,你的清单文件项目很好。检查您的清单库。也许您添加了一些库并收到此错误。还要检查您的项目和您的库是否有android:nameelement 。

希望这对您有帮助。


归档时间:

查看次数:

1491 次

最近记录:

8 年,7 月 前