安裝Android SDK Android SDK SetupDate:2011-10-30 03:32
There are some steps you must follow before you can build and run any code on your Android device. This is true regardless of whether you use Unity or write Android applications from scratch.
想要你的代碼能夠運行在Android裝置上,以下這些步驟是必須遵守的,不論你是用Unity或者獨立編寫Android 應用程式。
1. Download the Android SDK 下載Android SDK
Go to the Android Developer SDK webpage. Download and unpack the latest Android SDK.
進入Android 開發人員 SDK 網頁,下載並解壓最新的Android SDK。
2. Installing the Android SDK 安裝Android SDK
Follow the instructions under Installing the SDK, feel free to skip the optional parts relating to Eclipse. In step 4 of Installing
the SDK make sure to add at least one Android platform with API level equal to or higher than 9 (Platform 2.3 or greater), the Platform Tools, and the USB drivers if you're using Windows.
按照安裝 SDK的說明,可以跳過有關Eclipse的可選部分.在安裝的第4步,你必須確定已添加了一個API level 大於等於9的Android 平台(2.3 或之後的版本),平台工具,如果使用的是Windows,還得添加USB 驅動。
3. Get the device recognized by your system 系統識別裝置
This can be tricky, especially under Windows based systems where drivers tend to be a problem. Also, your device may come with additional information/specific drivers from the manufacturer.
這可能非常棘手,尤其是基於Windows系統中驅動的問題最為突出。同時,你的裝置可能會需要裝置供應商提供的額外的驅動。
- For Windows: If the Android device is automatically recognized by the system you still might need to update the drivers with the ones that came with the Android SDK. This is done through the Windows Device Manager.
Windows : 如果Android裝置被系統自動識別出,仍然需要更新Android SDK附帶的驅動.可以通過Windows驅動管理程式去完成。
If the device is not recognized automatically use the drivers from the Android SDK, or any specific drivers provided by the manufacturer.
如果這個裝置沒有被Android SDK附帶的驅動識別出,或者硬體供應商提供的驅動也不行。
Additional info can be found here: USB Drivers for Windows
更多資訊可以在這裡找到: USB Drivers for Windows
- For Mac: If you're using Mac no additional drivers are usually required.
Mac: 如果使用Mac作為開發機,就不需要額外的驅動了.
Note: Don't forget to turn on "USB Debugging" on your device. You can do this from the home screen: press MENU, select Applications > Development, then enable USB debugging.
注意:不要忘記開啟裝置上的"USB Debugging".可以從首頁完成:單擊MENU,選擇 Application > Development,然後選擇啟用 USB debugging。
If you are unsure whether your device is propperly installed on your system, please read the trouble-shooting page for
details.
如果你不能確定你的裝置是否已正確安裝到你的系統中,請參考故障排除頁.
4. Add the Android SDK path to Unity
添加Android SDK 路徑到Unity
The first time you build a project for Android (or if Unity later fails to locate the SDK) you will be asked to point out where you installed the Android SDK. Please point to the root-folder of the Android SDK. The location of the Android SDK can also be
changed in the editor by accessing Edit then Preferences.
第一次編譯Android項目時(或者Unity沒有找到SDK),會被要求指定Android SDK的安裝目錄.請指定Android SDK 的根目錄.Android SDK 的位置可以在Edit > Preference中修改。
轉自:http://game.ceeger.com/Manual/android-sdksetup.html