越来越" “机器人:图标”属性:属性不是一个字符串值“的错误,而上传的APK到Play商店属性、机器人、图标、商店

2023-09-04 10:01:22 作者:-拒绝丶爱上你

背景

这么多小时的我的空闲时间后,我已经准备好出版我的第一个应用程序来Play商店,但可悲的是我有困难上传签名的应用程序。

我已经成功出口与我创建(全部通过Eclipse和放大器; ADT)密钥库的应用程序,所以我有签名的APK上传到Play商店(的 此处 )。

问题

我不断收到这样的信息:

  

上传失败,您的APK不能使用AAPT转储徽章'进行分析。   错误输出:无法运行AAPT转储徽章:W /的ResourceType(14856):   没有已知的包资源数量0x01080049获得价值时,   错误获取安卓图标属性:属性不是一个字符串   值

这样:

在应用程序本身的作品非常好真实的设备,和所使用的图像文件所使用的的 Android的资产工作室的网站 。

我已经试过

我在这里搜索了计算器,发现很多帖子它(here).我读过许多人并试图在未来的事情,但没有任何帮助:

将应用程序图标上不同的文件夹/ S(绘制,绘制-MDPI......甚至绘制-xxxhdpi)有多个组合(把/删除每个文件夹)

设置标签,图标和主题上都应用程序标签,并在发射活动的标签。

更​​改图像文件名和文件本身(默认的应用程序图标取代了它)。

清理项目。

检查皮棉消息。

更​​新ADT(以22.3.0.v201310242005-887826),Eclipse的(开普勒服务发布1),SDK工具(22.3),SDK构建工具(至19.0.1)。一切都是pretty的很多最新的正式版本。

检查有没有使用的双jar文件(不jar文件存在于多个库,尤其是如果它有不同的版本)。

试图把的strings.xml进入RES /值恩,而不是RES /值

尝试添加:在清单的Android值属性的所有元数据标签(由谷歌建议)。它没有工作。事实上,在所有我读过的教程,我从来没有看到从AppWidget这样的要求,所以我认为它不是反正必要的。

试过AAPT命令:

  AAPT转储徽章
 

这已经表明了我同样的事情Play商店显示(我把它换成真正的包名和应用程序名称与XXX就在这里):

 应用:标签='XXX XXX图标='RES /绘制-MDPI / app_icon.png
可启动的活动:名称='XXX.XXX.XXXActivity标签='XXX XXX图标='RES /绘制-MDPI / app_icon.png
W /的ResourceType(9132):没有已知的包资源数0获得价值时,
x01080049
错误获取安卓图标属性:属性不是一个字符串值
 
ABB机器人如何与相机通讯 非常实用的技巧总结 实例

这是即使该文件确实存在此文件夹中。

下面的清单。再次,取代了真正的路径和XXX的活动和应用程序的名称。我可以向你保证的路径是正确的,因为该应用程序可以运行得很好。

 <舱单的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
    的xmlns:工具=htt​​p://schemas.android.com/tool​​s
    包=XXX.XXX
    机器人:INSTALLLOCATION =自动
    安卓版code =2
    机器人:VERSIONNAME =1.0>

    <用途-SDK
        安卓的minSdkVersion =9
        机器人:targetSdkVersion =19/>

    <支持屏
        机器人:anyDensity =真
        机器人:largeScreens =真
        机器人:normalScreens =真
        机器人:smallScreens =真
        机器人:xlargeScreens =真/>

    <用途,允许机器人:名称=com.android.launcher
                                   .permission.INSTALL_SHORTCUT/>
    <使用-权限的Andr​​oid:名称=机器人
                                   .permission.KILL_BACKGROUND_PROCESSES/>
    <使用-权限的Andr​​oid:名称=android.permission.READ_EXTERNAL_STORAG​​E/>
    <使用-权限的Andr​​oid:名称=android.permission.WRITE_EXTERNAL_STORAG​​E/>
    <使用-权限的Andr​​oid:名称=android.permission.ACCESS_SUPERUSER/>

    !<  - 需要的AdMob: - >
    <使用-权限的Andr​​oid:名称=android.permission.ACCESS_NETWORK_STATE/>
    <使用-权限的Andr​​oid:名称=android.permission.INTERNET对/>

    <! - 需要在应用程序内结算。 - >
    <使用-权限的Andr​​oid:名称=com.android.vending.BILLING/>
    <! - 需要在应用内计费的有效载荷 - >
    <使用-权限的Andr​​oid:名称=android.permission.GET_ACCOUNTS/>

    <应用
        机器人:名称=XXX.XXX.XXX
        机器人:allowBackup =真
        机器人:说明=@字符串/ app_description
        机器人:hardwareAccelerated =真
        机器人:图标=@可绘制/ app_icon
        机器人:标签=@字符串/ APP_NAME
        机器人:主题=@风格/ AppTheme>

        <活动
            机器人:名称=XXX.XXXActivity
            机器人:clearTaskOnLaunch =真
            机器人:configChanges =键盘| keyboardHidden |方向|
                                   屏幕布置| uiMode |屏幕尺寸|
                                   smallestScreenSize
            机器人:finishOnTaskLaunch =真
            机器人:图标=@可绘制/ app_icon
            机器人:标签=@字符串/ XXX
            机器人:launchMode =singleTask
            机器人:screenOrientation =fullSensor>
            <意向滤光器>
                <作用机器人:名称=android.intent.action.MAIN/>
                <类机器人:名称=android.intent.category.LAUNCHER/>
            &所述; /意图滤光器>
        < /活性GT;
     ......(其他活动和服务)
 

问题

这是怎么回事?

我如何克服呢?

解决方案

如果您使用的任何Android系统图标作为活动的图标,他们可能是问题。如果是,尝试复制这些图标到您的项目。使用它们在其他地方应该没有什么问题,因为徽章不碰那些。

Background

After so many hours of my free time, I'm ready to publish my very first app to the play store, but sadly I'm having difficulties uploading the signed app.

I've successfully exported the app with the keystore I've created (all via Eclipse & ADT), so I have the signed APK to be uploaded to the play store (here).

The problem

I keep getting this message:

Upload failed Your APK cannot be analyzed using 'aapt dump badging'. Error output: Failed to run aapt dump badging: W/ResourceType(14856): No known package when getting value for resource number 0x01080049 ERROR getting 'android:icon' attribute: attribute is not a string value

as such:

The app itself works very well on real devices, and the image file being used is a normal PNG file as used by the android-assets-studio website.

What I've tried

I've searched here on StackOverflow and found many posts about it (here). I've read many of them and tried the next things, but nothing has helped:

put the app icon on a different folder/s ("drawable", "drawable-mdpi", ... even "drawable-xxxhdpi") with multiple combinations (put/remove from each of the folders).

setting the label, icon and theme on both the "application" tag and on the launcher activity tag.

change the image file name and the file itself (replaced it with the default app icons).

clean up the project.

Checking Lint messages.

updating ADT (to 22.3.0.v201310242005-887826), Eclipse (to Kepler Service Release 1), SDK tools (to 22.3), SDK build tools (to 19.0.1). Everything is pretty much the latest official version.

checking that there's no double jar file being used (that no jar file exists on more than one library, especially if it has different versions).

tried putting the strings.xml into "res/values-en" instead of "res/values"

tried adding "android:value" attribute to all meta-data tags on the manifest (suggested by Google). It didn't work. In fact, in all of the tutorials I've read, I never saw such a requirement from an AppWidget, so I think it's not needed anyway.

tried the aapt command:

aapt dump badging

This has shown me about the same thing the play store shows (I've replaced the real package name and app name with XXX just here):

application: label='XXX XXX' icon='res/drawable-mdpi/app_icon.png'
launchable-activity: name='XXX.XXX.XXXActivity'  label='XXX XXX' icon='res/drawable-mdpi/app_icon.png'
W/ResourceType( 9132): No known package when getting value for resource number 0
x01080049
ERROR getting 'android:icon' attribute: attribute is not a string value

This happens even though the file do exist inside this folder.

Here's the manifest. Again, replaced the real paths and names of the activities and app with XXX. I can assure you that the paths are correct as the app can run just fine.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="XXX.XXX"
    android:installLocation="auto"
    android:versionCode="2"
    android:versionName="1.0" >

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

    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:xlargeScreens="true" />

    <uses-permission android:name="com.android.launcher
                                   .permission.INSTALL_SHORTCUT" />
    <uses-permission android:name="android
                                   .permission.KILL_BACKGROUND_PROCESSES" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_SUPERUSER" />

    <!-- required for admob: -->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />

    <!-- required for in-app billing . -->
    <uses-permission android:name="com.android.vending.BILLING" />
    <!-- needed for payload of in-app billing -->
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />

    <application
        android:name="XXX.XXX.XXX"
        android:allowBackup="true"
        android:description="@string/app_description"
        android:hardwareAccelerated="true"
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <activity
            android:name="XXX.XXXActivity"
            android:clearTaskOnLaunch="true"
            android:configChanges="keyboard|keyboardHidden|orientation|
                                   screenLayout|uiMode|screenSize|
                                   smallestScreenSize"
            android:finishOnTaskLaunch="true"
            android:icon="@drawable/app_icon"
            android:label="@string/XXX"
            android:launchMode="singleTask"
            android:screenOrientation="fullSensor" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
     ... (other activities and services)

The question

What is going on?

How do I overcome this?

解决方案

If you are using any android system icons as activity icons, they could be the problem. If you are, try copying these icons into your project. Using them elsewhere should be no problem since badging doesn't touch those.