Während meine apk generiert wird, führe ich den Befehl aapt dump badging
darauf aus. Ich halte die Aufnahme des folgenden Fehler:aapt ERROR bekomme 'android: name' attribut: attribut ist kein string-wert
application: label='Name' icon='res/drawable/icon_128x128.png'
application-debuggable launchable-activity: name='co.package.name.MainActivity' label='Name' icon='' ERROR getting 'android:name' attribute: attribute is not a string value
Ich habe versucht, einen Markennamen für alle Aktivitäten hinzuzufügen und alle anderen Werte-xxx Ordner unter/res zu entfernen, aber vergebens. Wenn ich jedoch ein ganz neues Projekt erstelle und ein neues APK erzeuge, kann das APK mit dem Befehl aapt dump badging
erfolgreich ausgeführt werden.
Ich verglich die gedruckte Nachricht sowohl APK und fand einen Hauptunterschied:
Nachricht von apk Erfolg:
application-label:'AppLabel'
application-icon-160:'res/drawable-xhdpi/icon_128x128.png'
application-icon-240:'res/drawable-xhdpi/icon_128x128.png'
application-icon-320:'res/drawable-xhdpi/icon_128x128.png'
application: label='AppLabel' icon='res/drawable-xhdpi/icon_128x128.png'
application-debuggable
launchable-activity: name='com.demo.testApp.MainActivity' label='' icon='
Nachricht von Fehlgeschlagen apk:
application-label:'MyApp'
application-label-ja:'MyApp'
application-label-de:'MyApp'
application-label-he:'MyApp'
application-label-zh:'MyApp'
application-label-fi:'MyApp'
application-label-nl:'MyApp'
..
.. (all languages would be attached, and finally the error occurs)
..
application: label='MyApp' icon='res/drawable/icon_128x128.png'
application-debuggable
launchable-activity: name='com.name.myapp.MainActivity' label='MyApp' icon=''
ERROR getting 'android:name' attribute: attribute is not a string value
----- Bearbeiten ------
Ich fand, dass es keine Relevanz für "Sprache" gibt. Ich habe meine Manifest-Datei geändert und sichergestellt, dass kein "application-label-XX" ausgedruckt wird, und der Fehler ist immer noch derselbe.
Unten ist mein Manifest-Datei
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.package.name"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<supports-screens android:anyDensity="true" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- Location -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!-- Camera -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<uses-feature
android:name="android.hardware.camera.front"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<!-- GCM Necessary -->
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<permission
android:name="co.package.name.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="co.package.name.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- Calendar R/W -->
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<application
android:allowBackup="true"
android:icon="@drawable/icon_128x128"
android:label="@string/app_name"
>
<!-- GCM meta-data -->
<meta-data
android:name="com.arrownock.push.SERVICE_TYPE"
android:value="GCM" />
<meta-data
android:name="com.arrownock.push.gcm.SENDER_ID"
android:value="@string/gcm_project_id" />
<meta-data
android:name="com.arrownock.push.APP_KEY"
android:value="@string/light_appkey" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/fb_id" />
<activity
android:name=".Main"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="co.package.name.SplashHP"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<activity
android:name="co.package.name.SettingsHP"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="co.package.name.LocationSelect"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="co.package.name.SettingOptionAlarm"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<activity
android:name="co.package.name.SettingOptionNotify"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<activity
android:name="co.package.name.SettingOptionShare"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="settingshare"
android:scheme="oauth" />
</intent-filter>
</activity>
<activity
android:name="co.package.name.HpCalendar"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<activity
android:name="co.package.name.SMSList"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<activity
android:name="co.package.name.SMSEditor"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<activity
android:name="co.package.name.SMSChooseToSend"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<activity
android:name="co.package.name.ShareToFB"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<activity
android:name="co.package.name.ActPOI"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<activity
android:name="com.facebook.LoginActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<activity
android:name="co.package.name.LogInOutFB"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<activity
android:name="co.package.name.LoginTwitter"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="t4jsample"
android:scheme="oauth" />
</intent-filter>
</activity>
<receiver
android:name="co.package.name.AlarmReceiver"
android:exported="true" >
<intent-filter>
<action android:name="@string/action_alarm" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<!-- GCM Service -->
<receiver
android:name="com.arrownock.push.AnPushGCMReceiver"
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="co.package.name" />
</intent-filter>
</receiver>
<service android:name="com.arrownock.push.GCMIntentService" />
<receiver
android:name="co.package.name.ExtendedReceiver"
android:exported="true"
android:icon="@drawable/icon_128x128"
android:label="Receiver" >
<intent-filter>
<action android:name="com.arrownock.push.PushService.MSG_ARRIVAL" />
</intent-filter>
</receiver>
</application>
</manifest>
Vielleicht ein falsches Format gibt es oder in meinem Manifest-Datei Typo?
------ bearbeiten ----
ich vielleicht auch prüfen, es ist eine Frage der Decodierung. In meiner Umgebung benutze ich utf-8. Vielleicht stimmt etwas nicht innerhalb des Erstellungsprozesses von XML in Binärdatei?
Wenn etwas unangemessener Verdächtiger oben ist, entschuldige ich mich aufrichtig. Ich habe drei Tage an diesem Thema festgehalten und kann wirklich keinen Fortschritt erreichen. Habe viele Dinge probiert und der Fehler ist immer derselbe. Jeder Vorschlag oder Kommentar würde sehr geschätzt werden.
Zeigen Sie Ihr vollständiges Manifest. Ich schätze, Sie haben einen Tippfehler in Ihrem Manifest oder vielleicht in einer Ihrer Ressourcendateien. – CocoNess
Haben Sie irgendwelche Beweise für ein Problem mit * Ihrer App *?Dies könnte genauso gut ein Problem mit ** aapt dump badging sein **. – CommonsWare
@TanjaV Ich habe meine Manifest-Datei angehängt. Ich würde auch meine String-Datei untersuchen. –