0

I am getting a really nasty error when trying to upload an APK to the Play store. It claims that the Manifest is not inside the APK, and I have already exhausted all my troubleshooting tricks and existing Stackoverflow questions. My code and logs are below. I would appreciate any partial or total help to solve the issue, so please share any ideas you may have.

What is aapt dump badging? What is error code 21181? If my manifest has some error why won't eclipse point it out? Please google, stop leaving so many landmines and boobytraps to the developers, this bug is really persistent!

The error message:

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

I have successfully signed my APK and verified that the manifest is indeed inside. My command line input:

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

My manifest file:

<?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>

UPDATE The deadline was closing in, so I ran out of time to root out the issue. As far as I can see, my desktop pc at work has some conflict on its Java/Jdk paths. I was able to make the signature and play store publishing process without problems on my personal laptop.

If anybody can cast more light on this problem, please share it with us :)

Boken
  • 4,825
  • 10
  • 32
  • 42
Josh
  • 6,251
  • 2
  • 46
  • 73
  • When you try running **`aapt dump badging`** yourself, what is the result? – CommonsWare Apr 02 '14 at 14:57
  • @CommonsWare I didn´t know how to use appt dump badging, sorry, I am only 5 months old in the android arena. I was running out of time, so I used my personal laptop to do the job. It appears to be that some path, or duplicate jar on my office's desktop is the problem, but I dont have time to root it out :$ – Josh Apr 11 '14 at 12:02

1 Answers1

0

I had the same issue using ActionBarSherlock. Try to check your build path for duplicated jar files and/or librairies linking.

Rogue
  • 751
  • 1
  • 17
  • 36