Android Marketplace Error: "The server could not process your apk. Try again."

Joe D'Andrea picture Joe D'Andrea · Feb 16, 2010 · Viewed 9.4k times · Source

I have an updated apk - tested successfully on various devices and simulator instances - with the following manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.myCompany.appName"
      android:versionCode="2"
      android:versionName="1.0.1">      
    <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5" />
    <uses-permission android:name="android.permission.INTERNET" />
    <supports-screens
          android:largeScreens="true"
          android:normalScreens="true"
          android:smallScreens="true" />
    <application android:icon="@drawable/icon" android:label="@string/icon_name" android:debuggable="false">
        <activity android:name=".myActivity" android:configChanges="keyboardHidden|orientation">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest> 

When I post to Android Marketplace as an upgrade to my existing 1.0 app, I get the aforementioned ambiguous message:

"The server could not process your apk. Try again."

I've searched elsewhere for this message in hopes of finding out what might be happening, to no avail. (A popular suggestion is to move the uses-sdk element to the top of the manifest, but as you can see it's already at the top.)

Clues welcome/appreciated.

Update: I just tried to upload the same file again. Now I get a new message:

The new apk's versionCode (2) in AndroidManifest.xml must be higher than the old apk's versionCode (2). The server could not process your apk. Try again.

Soooo Marketplace did get my upgraded apk after all? (The very first accepted apk's versionCode was 1, so this update was of course bumped to 2.) Confused …

Bumping it up to 3 and trying again. Surprise surprise, I get the original "could not process" error all over again. Going in circles. Hmm ... :(

Nuther Update: If I exit and re-enter the Marketplace page, now it shows that the app has been uploaded! Except there's no app icon. Curiouser and curiouser ... and this is all happening with a cache-cleared (standards-friendly) browser to boot.

So - do I trust the upload? Or start over ... with versionCode="4"? All I want is to get a solid "Upload successful, here's the icon, ready to publish" type of response.

Answer

Guilherme Brito picture Guilherme Brito · Sep 18, 2012

Run this tool, you can find this tool in SDK Platform Tools

aapt dump badging <path_to_exported_.apk>

and fix the errors. I receive this from google support.