Version: 5.4
Начало разработки под Android
Unity Remote 4

Настройка Android SDK

Whether you’re building an Android application in Unity or programming it from scratch, you need to set up the Android SDK (software development kit) before you can build and run any code on your Android device.

  1. Скачать Android SDK

On your PC, go to the Android Developer SDK website. Download and unpack the latest Android SDK.

  1. Установить Android SDK

Следуйте инструкциям на странице Installing the SDK (причём, вы можете свободно пропустить опциональные части, относящиеся к Eclipse). В шаге 4 руководства Installing the SDK убедитесь, что добавили как минимум одну Android platform (Android платформу) с уровнем API равным или выше 9 (платформа 2.3 или выше), Platform Tools и USB drivers (USB драйверы), если вы используете Windows.

3. Enable USB debugging on your device

USB debugging is a useful way to debug while connecting your Android device to the SDK, so get this set up before moving on to the next step.

To enable USB debugging, you first need to enable Developer options. To do this, navigate your phone to the “Build number” portion in your device’s Settings. Finding it can be different depending on the device:

  • Stock Android: Settings > About phone > Build number
  • Samsung Galaxy S5: Settings > About device > Build number
  • LG G3: Settings > About phone > Software information > Build number
  • HTC One (M8): Settings > About > Software information > More > Build number

Note: On operating systems older than version 4.2 (Jelly Bean), the Developer options aren’t hidden. Go to Settings > Developer options, then enable USB debugging.

Navigate to Build number using the instructions above. Tap on the build number 7 times. A small pop-up notification appears saying “you are now X steps away from being a developer” with a number that counts down with every additional tap. On the 7th tap, Developer options are unlocked. Go to Settings > Developer options, and check the USB debugging checkbox to enable debug mode when the device is connected to a computer via USB.

4. Connect your Android device to the SDK

Это может быть не так просто, особенно на Windows системах, в которых драйвера часто бывают источником проблем. Также, с вашим устройством может идти дополнительная информация или особые драйверы от производителя.

  • 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. You can do this through the Windows Device Manager. If the device is not recognized automatically, use the drivers from the Android SDK, or any specific drivers provided by the manufacturer. Find further information regarding USB Drivers for Windows on the Android Developer page. Для Mac: если вы разрабатываете на OSX, тогда обычно не требуется никаких дополнительных драйверов.

Если вы не уверены, что ваше устройство корректно установилось в системе, пожалуйста, прочтите страницу Решение проблем при разработке под Android для дополнительной информации.

  1. Добавить путь до Android SDK в Unity

При первой сборке проекта под Android (или если Unity не сможет обнаружить SDK), вас попросят указать местоположение папки, в которую вы установили Android SDK (вы должны выделить корневую папку установленного SDK). Путь до Android SDK также можно изменить в редакторе, выбрав в меню Unity > Preferences и перейдя в раздел External Tools окна настроек.

Начало разработки под Android
Unity Remote 4