Upgrading Unity Android, or How I learned to embrace masochism…

I’ve been working on a game for about a year called The Secret Castle. It’s coming along great and we’re getting really close to release. We’re launching for both Android and iOS, and I’ve been doing the bulk of the work on my PC (I can’t seem to live without multiple monitors).

I ran got burned during the great upgrade of 3.3 and swore that I wouldn’t ever upgrade my main development box again without testing it out in a VM or something first. I’ve been working on 3.4.2 for a while with no problems, and I had been ignoring the upgrade nags about 3.5.2 until I finally had some time to test the upgrade in a VM.

So, I fire up Virtual Box, upgrade my project – everything works fine. Test successfully complete. OK – on to the real thing!

I upgrade my development machine, everything also works fine. No errors, no warnings, it’s all looking good. I then connect up my tablet and try to build to it:


 Failed to re-package resources with the following parameters:
 package -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Program Files (x86)/Android/android-sdk-windows/platforms/android-Honeycomb\android.jar" -F bin/resources.ap_
 Configurations:
 (default)
 hdpi
Files:
 drawable\app_icon.png
 Src: () res\drawable\app_icon.png
 Src: (hdpi) res\drawable-hdpi\app_icon.png
 values\strings.xml
 Src: () res\values\strings.xml
 AndroidManifest.xml
 Src: () AndroidManifest.xml
Resource Dirs:
 Type drawable
 drawable\app_icon.png
 Src: () res\drawable\app_icon.png
 Src: (hdpi) res\drawable-hdpi\app_icon.png
 Type values
 values\strings.xml
 Src: () res\values\strings.xml
 Including resources from package: C:\android-sdk-windows\platforms\android-Honeycomb\android.jar
 applyFileOverlay for drawable
 applyFileOverlay for layout
 applyFileOverlay for anim
 applyFileOverlay for animator
 applyFileOverlay for interpolator
 applyFileOverlay for xml
 applyFileOverlay for raw
 applyFileOverlay for color
 applyFileOverlay for menu
 applyFileOverlay for mipmap
 Processing image: res\drawable\app_icon.png
 (processed image res\drawable\app_icon.png: 107% size of source)
 Processing image: res\drawable-hdpi\app_icon.png
 (processed image res\drawable-hdpi\app_icon.png: 106% size of source)
 (new resource id app_icon from drawable\app_icon.png #generated)
 (new resource id app_icon from hdpi\drawable\app_icon.png #generated)
 AndroidManifest.xml:5: error: Error: String types not allowed (at 'configChanges' with value 'fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen').
 AndroidManifest.xml:11: error: Error: String types not allowed (at 'configChanges' with value 'fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen').
 AndroidManifest.xml:13: error: Error: String types not allowed (at 'configChanges' with value 'fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen').
 AndroidManifest.xml:17: error: Error: String types not allowed (at 'configChanges' with value 'fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen').
UnityEngine.Debug:LogError(Object)
 PostProcessAndroidPlayer:PostProcess(BuildTarget, String, String, String, String, String, String, BuildOptions) (at C:/BuildAgent/work/300357e52574df36/Editor/Mono/BuildPipeline/PostProcessAndroidPlayer.cs:288)
 UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

Crap. It takes me about 2 hours to finally figure out (by reading the release notes) that Unity 3.5.2 requires your SDK to be at version 19. I tried to fire up the SDK manager, but it kept failing to download repository xml files (404’d making me think that I was really out of date)

Well, looks like I figured out the root cause.. but how to fix it since I can’t use the SDK manager to update itself? Luckily I’ve got Eclipse set up, so I did the following:

1. Opened Eclipse – went to Help -> Check for Updates

2. Installed all Updates

3. Ran SDK Manager – installed SDK and Platform Tools updates (This part took a bit since I was on revision 12…)

After getting all that upgraded I was able to build successfully from Unity. Can’t blame Unity for this one – I was totally out of date and should have thought of that first… hopefully this will help anyone who gets into the same situation.

Advertisements

0 Responses to “Upgrading Unity Android, or How I learned to embrace masochism…”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





%d bloggers like this: