How To Setup Unity3D Android Build Environment On Mac
This is how I successfully set up the development environment of Unity3D Android game on Mac.
1. Install JDK 8
I experienced Android SDK installation problem with the latest JDK (v12 at that time) because some old features required for the installation were removed.
This guy had the same error as I had.
I had to downgrade to JDK 8 (8u211) as none of the suggested solutions worked for me.
If you also have the similar problem, I recommend you to do the same thing.
2. Install Homebrew (Package manager for MacOS)
>> /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
There is an interesting discussion on Home-brew community.
Homebrew is causing a potential security issue which a malicious program can acquire the admin password. I don’t worry too much about it because Homebrew was the only way I managed to install the Android SDK on Mac.
3. Install Android SDK
>> brew install android-sdk
The SDK version will be automatically determined by Homebrew.
4. Unity Android Setup
In the Unity manu, go to Unity > Preferences > External Tools.
In the Android section, set up JDK and SDK like below; (JDK full path might be different from yours depending on the SDK version.)
JDK: /usr/local/Caskroom/android-sdk/4333796
SDK: /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
Comments
Post a Comment