运行 aapt dump badging 命令在已签名的 apk 上出错

Error while running aapt dump badging command on signed apk

当我在签名的 apk 上 运行 aapt dump badging 命令时出现奇怪的错误。

这是我得到的:

W/zipro   ( 9829): Buffer too short, requires 1073 bytes for entry name
E/asset   ( 9829): ARGH: name too long?
W/zipro   ( 9829): Buffer too short, requires 1605 bytes for entry name
E/asset   ( 9829): ARGH: name too long?
W/zipro   ( 9829): Buffer too short, requires 964 bytes for entry name
E/asset   ( 9829): ARGH: name too long?
W/zipro   ( 9829): Buffer too short, requires 1234 bytes for entry name

因此我无法将其上传到 Play 商店。 我在 Play 商店

上收到以下错误

我的清单文件如下:

 <?xml version="1.0" encoding="utf-8"?>

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

<permission
    android:name="com.iriemo.StaySecure.permission.C2D_MESSAGE"
    android:protectionLevel="signature" />

<uses-permission android:name="com.iriemo.StaySecure.permission.C2D_MESSAGE" />

<!-- Custom permission for maps -->
<permission
    android:name="com.iriemo.StaySecure.permission.MAPS_RECEIVE"
    android:protectionLevel="signature" />

<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="com.iriemo.StaySecure.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.SEND_SMS" />

<uses-feature
    android:glEsVersion="0x00020000"
    android:required="true" />

<uses-feature
    android:name="android.hardware.telephony"
    android:required="true" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

<application
    android:name="com.iriemo.StaySecure.AppController"
    android:allowBackup="true"
    android:debuggable="false"
    android:icon="@drawable/ic_logo"
    android:label="StaySecure"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".SplashScreen"
        android:label="StaySecure"
        android:screenOrientation="portrait"
        android:theme="@style/FullscreenTheme" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="com.iriemo.StaySecure.MainActivity"
        android:label="StaySecure"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Darker_blue_theme_app_compat" >

    </activity>
    <activity
        android:name="com.iriemo.StaySecure.EditGeofenceActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Darker_blue_theme_app_compat" >
    </activity>
    <activity
        android:name="com.iriemo.StaySecure.AddGeofenceActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Darker_blue_theme_app_compat" >
    </activity>
    <activity
        android:name="com.iriemo.StaySecure.EditProfileActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Darker_blue_theme_app_compat" >
    </activity>
    <activity
        android:name="com.iriemo.StaySecure.ImageSelectionActivity"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" >
    </activity>

    <activity
        android:name="com.iriemo.StaySecure.SelectCountryCode"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Darker_blue_theme_app_compat" >
    </activity>

    <activity
        android:name="com.iriemo.StaySecure.selectContactActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Darker_blue_theme_app_compat" >

    </activity>

    <activity
        android:name=".ViewPagerActivity"
        android:label="StaySecure"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Darker_blue_theme_app_compat" >
    </activity>
    <activity
        android:name=".RegisterActivity"
        android:label="StaySecure"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Darker_blue_theme_app_compat" >
    </activity>
    <activity
        android:name="com.iriemo.StaySecure.UserInTroubleActivity"
        android:label="StaySecure"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Darker_blue_theme_app_compat"
        android:windowSoftInputMode="stateHidden|adjustResize" >
    </activity>
    <activity
        android:name=".FakeSwitchOffActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.FakeSwitchOff" >
    </activity>
    <activity
        android:name="com.iriemo.StaySecure.ParticipationCheck"
        android:excludeFromRecents="true"
        android:label="StaySecure"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="com.iriemo.StaySecure.UserIsParticipantActivity"
        android:label="StaySecure"
        android:noHistory="true"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Darker_blue_theme_app_compat"
        android:windowSoftInputMode="stateHidden|adjustResize" >
    </activity>
    <activity android:name="com.iriemo.StaySecure.LoadImageFromServer" >
    </activity>
    <activity
        android:name="com.iriemo.StaySecure.CounterActivity"
        android:excludeFromRecents="true"
        android:label="StaySecure"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="com.iriemo.StaySecure.SafetyTipActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Darker_blue_theme_app_compat" >

    </activity>
    <activity
        android:name="com.iriemo.StaySecure.TrackMeActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Darker_blue_theme_app_compat" >
    </activity>
     <activity
        android:name="com.iriemo.StaySecure.GetHelpOrCloseTrackMeActivity"
        android:excludeFromRecents="true"
        android:label="StaySecure"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>

     <activity android:name="com.iriemo.StaySecure.GetHelpOrStopGeofenceService"
           android:excludeFromRecents="true"
        android:label="StaySecure"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent">
     </activity>

    <service android:name="com.iriemo.StaySecure.IntentService_UploadImage" >
    </service>
    <service android:name=".CheckScreenOnOffService" >
    </service>
    <service android:name=".BlockSystemPopUp" >
    </service>
    <service android:name=".SendSmsService" >
    </service>
    <service android:name=".LocationUpdateService" >
    </service>
    <service android:name=".TrackingUser" >
    </service>
    <service android:name=".GCMIntentService" >
    </service>
    <service android:name=".RemindRegistration" >
    </service>
    <service android:name=".PowerBtnPressedServiceForActivation" >
    </service>
    <service android:name=".UpdateMarkerService" >
    </service>
    <service android:name=".TrackMeUpdateLocationService" >
    </service>
    <service android:name="com.iriemo.StaySecure.GeofenceLocationService" />
    <service android:name="com.iriemo.StaySecure.StaySecureLocationService" />

    <!-- Geofence BroadCast Receiver -->
    <receiver
        android:name="com.iriemo.StaySecure.GeofenceBroadcastReceiver"
        android:exported="false" >
        <intent-filter>
            <action android:name="com.iriemo.StaySecure.ACTION_GEOFENCE_RECEIVE" />
        </intent-filter>
    </receiver>

    <receiver android:name="PowerBtnPressedReceiver" >
        <intent-filter>
            <action android:name="android.intent.action.SCREEN_ON" />
            <action android:name="android.intent.action.SCREEN_OFF" />
            <action android:name="android.Intent.ACTION_USER_PRESENT" />
        </intent-filter>
    </receiver>
    <receiver android:name="PowerBtnPressedReceiverForActivation" >
        <intent-filter>
            <action android:name="android.intent.action.SCREEN_ON" />
            <action android:name="android.intent.action.SCREEN_OFF" />
            <action android:name="android.Intent.ACTION_USER_PRESENT" />
        </intent-filter>
    </receiver>
    <receiver android:name="MyMessageReceiver" >
        <intent-filter>
            <action android:name="com.iriemo.staysecure.incomingmsg" />
        </intent-filter>
    </receiver>

    <!-- App Admin Receiver -->
    <receiver
        android:name="MyAdminReceiver"
        android:permission="android.permission.BIND_DEVICE_ADMIN" >
        <meta-data
            android:name="android.app.device_admin"
            android:resource="@xml/admin" />

        <intent-filter>
            <action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
        </intent-filter>
    </receiver>
    <receiver
        android:name="com.google.android.gcm.GCMBroadcastReceiver"
        android:permission="com.google.android.c2dm.permission.SEND" >
        <intent-filter>

            <!-- Receives the actual messages. -->
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            <!-- Receives the registration id. -->
            <action android:name="com.google.android.c2dm.intent.REGISTRATION" />

            <category android:name="com.iriemo.StaySecure" />
        </intent-filter>
    </receiver>
    <receiver android:name=".AutoReceive" >
        <intent-filter>
            <action android:name="android.intent.action.PHONE_STATE" />
        </intent-filter>
    </receiver>

    <!-- BootUpReceiver -->
    <receiver
        android:name="BootupReceiver"
        android:permission="android.permission.RECEIVE_BOOT_COMPLETED" >
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />

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

    <!-- BootUpReceiver -->
    <receiver android:name="SimMismatchedReceiver" >
        <intent-filter>
            <action android:name="com.iriemo.StaySecure.SimMismatched" />
        </intent-filter>
    </receiver>


    <!-- For fetching current location -->
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />

    <!-- Google Api Key for maps -->
    <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="AIzaSyC6umJJ2DmCBxOl2fdTjOGfwiWQ8vcFen4" />

    <provider
        android:name="InternalStorageContentProvider"
        android:authorities="com.iriemo.StaySecure"
        android:exported="true" />


</application>

您的 APK 文件中似乎有一些文件的文件名 and/or 文件路径很长。检查它并重命名文件和目录,以便 APK 中生成的文件路径更短。

如果我解释 AOSP 源代码正确,则 APK 文件内的最大文件路径为 256 个字符。