Google Play说我的APK丢失了Manifest。为什么?

时间:2014-04-02 14:36:01

标签: android upload apk manifest aapt

尝试将APK上传到Play商店时,我遇到了一个非常讨厌的错误。 它声称Manifest不在APK中,我已经筋疲力尽了 我的故障排除技巧和现有的Stackoverflow问题。 我的代码和日志如下。如果您有任何部分或全部帮助可以解决问题,我将不胜感激,所以请分享您的想法。

什么是aapt转储徽章?什么是错误代码21181?如果我的清单有一些错误,为什么赢得日食会指出它? 请google,停止向开发人员留下这么多地雷和boobytraps,这个bug真的很执着!

错误消息:

Upload Fail
Your APK cannot be analyzed by'aapt dump badging'. Error Output:
Failed to run aapt dump badging:
W/        (21181): Zip: Could not find entry resources.arsc
W/        (21181): Zip: Could not find entry AndroidManifest.xml
ERROR: dump failed because no AndroidManifest.xml found

我已经成功签署了我的APK并验证了清单确实在里面。 我的命令行输入:

keytool -genkey -alias nostrumkeystore -keyalg RSA -key
size 1024 -sigalg MD5withRSA -keystore nostrumkeystore -validity 36500

jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore 
nostrumkeystore NostrumApp.apk nostrumkeystore

zipalign -v 4 NostrumApp.apk NostrumAppZIP.apk

我的清单文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.boira.nostrumnfc"
    android:versionCode="1"
    android:versionName="1.0">

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="16" />

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />
    <uses-feature android:name="android.hardware.camera.flash" />

    <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.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <permission
        android:name="com.boira.nostrumapp.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.boira.nostrumapp.permission.MAPS_RECEIVE" />

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

    <application
        android:allowBackup="false"
        android:debuggable="false"
        android:icon="@drawable/ic_launcher"
        android:label="@string/sfyapp_name"
        android:theme="@style/AppTheme">
        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="AIzaSyDbTp4mYLm8s2-Ascy5788U48ves-eCwms" />

        <activity
            android:name="com.boira.nostrumapp.SplashActivity"
            android:label="@string/sfyapp_name"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.boira.nostrumapp.MainActivity"
            android:label="@string/sfyapp_name"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"></activity>
        <activity
            android:name="com.boira.nostrumapp.PreScanQRActivity"
            android:label="@string/sfyapp_name"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"></activity>
        <activity
            android:name="com.boira.nostrumapp.ScanQRActivity"
            android:label="@string/sfyapp_name"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"></activity>
        <activity
            android:name="com.boira.nostrumapp.LoginActivity"
            android:label="@string/sfyapp_name"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan">

        </activity>
        <activity
            android:name="com.boira.nostrumapp.ListaProductosActivity"
            android:label="@string/sfyapp_name"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"></activity>
        <activity
            android:name="com.boira.nostrumapp.ResumenTicketActivity"
            android:label="@string/sfyapp_name"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"></activity>
        <activity
            android:name="com.boira.nostrumnfc.FinPagoActivity"
            android:label="@string/sfyapp_name"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"></activity>
        <activity
            android:name="com.boira.nostrumapp.RegistroActivity"
            android:label="@string/sfyapp_name"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustResize"></activity>
        <activity
            android:name="com.boira.nostrumapp.MapActivity"
            android:label="@string/sfyapp_name"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan"></activity>
        <activity
            android:name="com.boira.nostrumapp.MapclusterActivity"
            android:label="@string/sfyapp_name"
            android:screenOrientation="portrait"></activity>
        <activity android:name="com.boira.nostrumapp.OpcionesActivity"></activity>
        <activity
            android:name="com.boira.nostrumapp.TarjetaClienteActivity"
            android:label="@string/title_activity_tarjeta_cliente"></activity>
        <activity android:name="com.boira.nostrumnfc.CardNumberActivity"></activity>
        <activity
            android:name="com.boira.nostrumapp.DNIEmailActivity"
            android:label="@string/title_activity_dniemail"></activity>
        <activity
            android:name="com.boira.nostrumapp.RememberPasswordActivity"
            android:label="@string/title_activity_remember_pasworld"></activity>
        <activity
            android:name="com.boira.nostrumapp.ListShopActivity"
            android:label="@string/title_activity_list_shop"></activity>
    </application>
</manifest>

更新 截止日期即将结束,所以我没时间根除问题。据我所知,我的桌面电脑在其Java / Jdk路径上存在一些冲突。 我能够在我的个人笔记本电脑上毫无问题地进行签名和播放商店发布过程。

如果有人能对这个问题有所了解,请与我们分享:)

1 个答案:

答案 0 :(得分:0)

我使用ActionBarSherlock时遇到了同样的问题。尝试检查重复的jar文件和/或librairies链接的构建路径。