Android - Can't upload Unity generated APK file to market

I can’t upload a Unity generated APK file to the Android market. I’ve tried the following browsers:

  1. Safarai - hangs during upload
  2. Firefox - hangs during upload
  3. Chrome - doesn’t hang but stops uploading after 10 seconds for a 28 MB file. Then when I try to upload an image it says upload an APK file first. So I think there must be something incorrect in the APK file.

Has anyone else run into this problem and do they have a solution?

if it just hangs and the page does not give you any output, likely your connection is timing out or something cause its the browser / connection that go wrong, not the apk (otherwise the page would give you an error, it wouldn’t just hang in upload etc)

@dreamora -

The Internet connection is still active so that isn’t the problem.

The upload with Chrome doesn’t hang, it appears to complete, but then the Android Market thinks no APK file has been uploaded. And I get no error message.

  1. Is there a way to look at a logfile of the upload?

  2. I think there might be something wrong with the APK file that Unity produced. But I can’t look at the AndroidManifest.xml file because it is in a binary format. Is there a way to verify that the APK file is correct?

Transfer it to an Android phone and use an APK installer to install it. If you don’t have an Android phone you can upload it to the internet and someone (like me) can test it for you.

@spire8989 -

I’ve tested the Unity APK file on an Android phone and it works fine. But I can’t upload it to the Android market.

There are items in the AndroidManifest.xml file that are needed to upload to the Android Market, like the VersionName and the VerisonCode, which I can’t check because the AndroidManifest.xml created by Unity is in binary format.

So even though the APK can run on an Android phone, that doesn’t mean it has everything needed to publish it on the Android market.

I’ve tried a few different ways to sign the APK file, as I mention in this post:

http://forum.unity3d.com/viewtopic.php?t=64270

and still I can’t get the Unity generated APK file to upload to the Android market.

VersionName and VersionCode are available from within the editor, under Other Settings / Bundle Version + Version Code
But if you want to make sure you can inspect generated manifest available under Temp/StagingArea, after you have built the application package.

And, a “faulty” VersionName should not limit uploading; it’s just a string of your choice. It’s only displayed next to the application title when showing the application details. Likewise will a faulty VersionCode be indicated as such after the upload to the market has finished; it should not limit the upload itself. And if you never succeeded in uploading the application previously any positive integer will do, like the default value of 1.

If this problem persists, please report a bug and attach the .apk which demonstrates the problem.

I think it has been mentioned here on the forums that there is a 25 MB limit on apps published through the market. It is however never explicitly mentioned anywhere (that I’ve seen so far) but this post seem indicate the same:
http://www.google.com/support/forum/p/Android+Market/thread?tid=43b11f3aa6d2c5bc&hl=en

If the uploading stops very quickly it usually means that the .apk is too big. Uploading a correct .apk with a somewhat faulty manifest (ie. VersionCode mismatch) usually does not create this problem.

I just tried uploading a 60mb apk and no luck… I did some research and it appears that there is a 25mb limit. That’s bs

Yup, that was the problem, the 25 MB limit. If your APK is under 25 MB, upload works fine. Over 25 MB, nothing happens, and no error message.

Pretty silly.

But i received a mail recently that stated that they are going to raise the limit to 50mb so you should be ok soon with that… But be prepared for user complains :smile:

Here is the email (you should have it though…):

Related to this issue, is there a way to split a 200 MB apk into 2 apk’s? One that contains the application binary and a few minimal required files(max 30 MB) and another apk containing the application data and gfx/sfx resource files required by the first apk?

android pro + asset bundles can do that for example.

Using Asset bundles was a very bad experience for me when I had to port to Android a big project with tons of textures and materials that was nicely built for the iOS.
We had to refactor a lot of project code to replace Resources.Load( ) calls (where needed) with calls to WWW to load the asset bundles. We also had to do a lot of manual memory management when working with asset bundles. Not to mention that many methods had to be made coroutines because of using WWW to load the asset bundles.

It kind of beats the entire purpose of the Unity engine: code once deploy everywhere. :slight_smile:
If my game doesn’t require by design any streamed assets thus allowing me to design it in one way for the iOS, it seams a bit of a hacky way to integrate streamed assets in my game just because of a stupid APK size limitation on the Android. (boy I hate google right now)

Thus, I am searching for a way to do this porting as generic as possible and maybe help others on this community struggling with this.