AAPT错误

问题描述:

确定即时得到这个问题出蓝色,不知道是什么原因造成的,当我上传的APK Play商店,它说AAPT错误

Failed to run aapt dump badging: AndroidManifest.xml:425: error: ERROR getting 'name' attribute: attribute is not a string value

清单如何以往任何时候都显得精致这里

<activity 
     android:theme="@ref/0x7f0b0142" 
     android:label="@ref/0x7f0802ab" 
     android:name="<absolute path like a.b.c.activityname>" 
     android:launchMode="1" 
     android:screenOrientation="1" 
     android:parentActivityName="absolute path like a.b.c.activityname" /> 

当然,以上查找是在apk分析器上完成的最终清单。

并通过以下所有没有错误本地运行验证

AAPT转储串
AAPT转储权限 AAPT转储资源
AAPT转储配置

错误怎么过就出现当我这样做转储徽章

ERROR getting 'name' attribute: attribute is not a string value

aapt list -v -a

这是非常令人困惑,为什么活动名称是由,即使它的形式a.c.b串解决...... activityname任何想法任何一个?到底是怎么回事这里

enter image description here

+0

你编辑的输出发布?为什么名称条目中有“”符号?这对XML文件来说似乎是可疑的。 [api doc](https://developer.android.com/guide/topics/manifest/activity-element.html)很明显,该字段是一个字符串,应该是一个完全合格的类名或使用短手法。 – Paxic

+0

我编辑了这里发布的值,是的,没有在XML中,再加上这个apk编译和运行罚款aapt失败转储徽章 – SoftReference

确定了它固定AAPT的报告不正确的错误

简单的解决方案/解决方法是使用的类别名称的字符串资源。

<category android:name="@string/example" > 

替换:

<category android:name="com.example.package">