sideways screenshot

Some notes on exporting Unity to Android on Windows

I’m experimenting with exporting my latest Unity project. I’ve not blogged about it yet, but it’s a super simple game. After the mammoth last one, I thought I’d do something short this time.

Installing the Android SDK

There’s no native export from Unity to Android. It’d be nice if there was, but I think I expect too much sometimes! So you have to install the Android SDK, which is easy, they give you a link straight to the site. But before you install that, you need to install the Java Developer tools (JDK) – the whole thing feels like one of those Dizzy adventures where to finish one quest you have to do another beforehand.

I messed this up initially, by installing the Android SDK first, which checks for the Java JDK, and didn’t find it. And then WON’T ever find it if you continue. So I had to uninstall and reinstall when I had the JDK.

Exporting from Unity

So with everything needed installed, I could now go to Unity’s export panel and choose Android. Doing this without the SDK asked to be pointed to its location, but now it just seemed to find it.

Unity’s own drivers seemed to be outdated, so it asked to update itself. I agreed. Then it seemed to sit on this screen for aaaaages.

updating Unity SDK

So long that I wasn’t even sure it was working. At some points it did stop to ask things, which I had to agree.

Then it bombed out for what I thought was a silly reason. I hadn’t added a “bundle identifier” which is an oddly formatted product name prefixed with the company name, prefixes with a “.com” which I find a really odd format to ask for.

bundle identifier

 

The funny thing is, it takes ages before it fails on this step. Not sure why Unity doesn’t check it’s there before it starts all the lengthy processing.

I thought it was this bit:

player settings

But it’s not. Even though that’s the bit it opens when you press “ok”. It’s actually the bit underneath. Which isn’t prefilled by the company name or product name you add above. Come on Unity, you can make this a bit easier for us!

bundle settings 2

I don’t have a company, so I added “DavidDickBall” which is a bit stupid and embarrassing, but it’s the name of this blog so I suppose I’m going to suffer the embarrassment of that anyway.

After these changes, it works! It saves me a apk file, which I’ve emailed to my phone. Downloaded, and it works!

vertical vector mobile game