I'm trying to compile for Android phone and I don't know what this means.

I’m trying to compile for the Android phone setting. My computer just gets to a certain point then the window goes away and my laptop thinks for a split second, then keeps bringing up the last image shown in this .GIF.

I can’t compile for Android phone alone. Compiling my tests project for Window is fine. Does anyone know where my problem is?

Seems like there are no Andriod SDK in your computer or you have the SDK but the SDK path are not set correctly. See this manual page: Unity - Manual: Android environment setup


I’m pretty sure that I keep selecting the Android SDK when the window on the right comes up. I select “C:\Program Files\Android\Android Studio”. The computer closes all windows, thinks for a split second, then opens thew same window. I take it that that I’ve downloaded isn’t the right SDK. Or perhaps I have the location of the SDK wrong. (?).

I don’t know what to do.

Android Studio isn’t the same as the SDK, but it can help you locate it.

Open up Android Studio (Just start a blank project to get past the welcome screen)
Look for this icon and click it:

When the SDK Manager window opens, you should see the SDK directory in the top area (Where it says SDK Path):

That is the directory Unity wants when that error pops up. If you don’t have it installed yet, you can use this SDK Manager Window to install one. Hope that helps.

1 Like

BoyerWorks and Brian Washechek have the same initials.The chances of that happening again are 1 in 26^2.

Anyway, thank you for your your assistance. I’m waiting for it to load…

Ughhh… Still doesn’t load. I don’t really understand why. Everything’s selected, correct?

When Unity says it cannot locate the Android SDK, are you selecting the directory shown next to SDK Path in the above screenshot?

c:\Users\Br…\AppData\Local\Android\sdk

^ That’s where the SDK should be located on your computer. That’s the directory you should choose when Unity requests the SDK location. If that’s the one you’re selecting, there may be something else going on.

No, the connected device shouldn’t have anything to do with it.

You can safely close Android Studio at this point.

Try building your game again in Unity. If the error comes up again, try using the following directory:

c:\Users\Brian\AppData\Local\Android\sdk

Check the SDK path in the Unity > Perferences > External Tools. looks like It shoud be the path c:\Users\Brian\AppData\Local\Android\sdk in your side.

Awesome!


.
Well, kinda.
It moved me past that roadblock and into another.


I’m now wondering what the error “Failed to re-package resources. See the console for more issues.” means. I would at least look at the console if I knew how. It’s not referring to the physical Ouya is it?

Hopefully someone can interpret this error for me.

Could you please post the console log?

I’m unsure how to look at the console log. Could you tell me?

In Unity Editor, select the menu Window > Console

Like this, right?

Seems that someone have encounted same issue. Please look at this thread Failed to re-package resources - Unity Engine - Unity Discussions

Alright, I followed it to the point where I had to goto “Android SDK | “Tools” Direct Links – AfterROOT”, then I downloaded "Android SDK Build-tools rev. 24.0.1". I unpackaged it and it gives me about 30 files. Do I place them somewhere so Unity can access them?

Am I barking up the correct tree?

Seems that just need to remove the 24.0.0 folder. See below message from the thread Failed to re-package resources : aapt.exe package - Unity Engine - Unity Discussions

I kind of got the idea that I have to find an appt folder on the Ouya and delete it. I was unable because an “appt” folder didn’t exist.

I tried unzipping it to “Removable Storage Devices\OUYA Console\Internal storage\Android\data\Android 7.0”. It did nothing. I had to create “\data\Android 7.0”.

You said “Seems that just need to remove the 24.0.0 folder.” Well, I’m pretty sure that I don’t even have a 24.0.0 folder. (I’m assuming you’re saying I have to remove it on the Ouya console. See attachment.)