2017-07-03 43 views
-1

確定即時得到這個問題出藍色,不知道是什麼原因造成的,當我上傳的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

你編輯的輸出發佈?爲什麼名稱條目中有「<" and ">」符號?這對XML文件來說似乎是可疑的。 [api doc](https://developer.android.com/guide/topics/manifest/activity-element.html)很明顯,該字段是一個字符串,應該是一個完全合格的類名或使用短手法。 – Paxic

+0

我編輯了這裏發佈的值,是的,沒有<>在XML中,再加上這個apk編譯和運行罰款aapt失敗轉儲徽章 – SoftReference

回答

0

確定了它固定AAPT的報告不正確的錯誤

簡單的解決方案/解決方法是使用的類別名稱的字符串資源。

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

替換:

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