Unity sdk error

Решение проблем при разработке под Android Ошибка “No Platforms Found”: Удалите установленный Android SDK и убедитесь, что у вас нигде не установлены ещё копии. Обновите Java до последней стабильной версии. Никогда не забывайте, что хоть самая последняя версия не должна конфликтовать, у пользователей в прошлом всё равно бывали проблемы. Скачайте свежую копию самого последнего […]

Содержание

  1. Решение проблем при разработке под Android
  2. Ошибка “No Platforms Found”:
  3. Unity не удаётся установить ваше приложение на ваше устройство
  4. Ваше приложение падает сразу после запуска.
  5. Building DEX Failed
  6. Приложение падает через несколько секунд после начала проигрывания видео.
  7. Моя игра закрывается, когда я жму кнопку сна
  8. Android environment setup
  9. Installing dependencies
  10. Customizing dependencies
  11. Supported dependency versions
  12. Setting the Android SDK Target API
  13. Chrome OS
  14. Troubleshooting Android development
  15. “No Platforms Found” error:
  16. Unity fails to install your application to your device
  17. Your application crashes immediately after launch.
  18. Building DEX Failed
  19. The game crashes after a couple of seconds when playing video
  20. My game quits when I press the sleep button
  21. Troubleshooting Android development
  22. “No Platforms Found” error:
  23. Unity fails to install your application to your device
  24. Your application crashes immediately after launch.
  25. Building DEX Failed
  26. The game crashes after a couple of seconds when playing video
  27. My game quits when I press the sleep button

Решение проблем при разработке под Android

Ошибка “No Platforms Found”:

  1. Удалите установленный Android SDK и убедитесь, что у вас нигде не установлены ещё копии.
  2. Обновите Java до последней стабильной версии. Никогда не забывайте, что хоть самая последняя версия не должна конфликтовать, у пользователей в прошлом всё равно бывали проблемы.
  3. Скачайте свежую копию самого последнего ADT Bundle и установите его следуя инструкциям. Это должно корректно откалибровать инструменты разработки: http://developer.android.com/sdk/index.html
  4. Настройте Unity на работу с установленным Android SDK.

Unity не удаётся установить ваше приложение на ваше устройство

  1. Убедитесь, что ваш компьютер видит ваше устройство и может взаимодействовать с ним. Для деталей см. Публикация сборок.
  2. Проверьте консоль Unity на наличие сообщений об ошибках. Это часто помогает в определении проблемы.

Если у вас появляется ошибка “Unable to install APK, protocol failure” во время сборки, то это значит, что ваше устройство подключено через USB-порт с низким питанием (возможно порт на клавиатуре или ещё на какой-нибудь периферии). Если такое случается, то попробуйте подсоединить устройство в USB порт на самом компьютере.

Ваше приложение падает сразу после запуска.

  1. Убедитесь, что вы не пытаетесь использовать NativeActivity с устройствами, которые это не поддерживают.
  2. Попробуйте убрать все нативные плагины, что у вас есть.
  3. Попробуйте отключить stripping.
  4. Используйте adb logcat чтобы получить отчёт о крахе с вашего устройства.

Building DEX Failed

Это ошибка, которая выдаёт сообщение, вроде следующего:-

Обычно это вызвано неверной версией Java на вашем компьютере. Обновление Java до последней версии обычно решает проблему.

Приложение падает через несколько секунд после начала проигрывания видео.

Убедитесь, что Settings->Developer Options->Don’t keep activities не включено на вашем телефоне. Проигрыватель видео — это отдельное приложение и поэтому обычное игровое приложение будет закрыто, если проигрыватель видео включён.

Моя игра закрывается, когда я жму кнопку сна

Измените тег activity в файле AndroidManifest.xml так , чтобы он содержал тег android:configChanges , сделайте это таким образом, как описано здесь.

Пример тега activity может выглядеть, например, вот так:-

Источник

Android environment setup

To create a Unity application for Android, you first need to set up your Unity project to support Android. To support Android, a Unity project requires the following dependencies:

  • The Android Build Support module.
  • The Android Software Development Kit (SDK).
  • The Native Development Kit (NDK).
  • A Java Development Kit. By default, Unity uses OpenJDK.

Before you get started, check Unity’s Requirements and compatibility documentation for Android to make sure you’re aware of any limitations for developing a Unity application for Android.

Installing dependencies

Unity distributes dependencies as modules which means you use the Unity Hub to install them. You can install them either when you install a new Unity Editor version, or add them to an existing Unity Editor install. To install modules:

The three modules to install are:

  • Android Build Support
  • Android SDK & NDK Tools
  • OpenJDK

Unity Hub displaying the three dependency modules.

Unity installs Android SDK & NDK Tools and OpenJDK respectively in the SDK , NDK , and OpenJDK folders under /Unity/Hub/Editor/[EditorVersion]/Editor/Data/PlaybackEngines/AndroidPlayer/ .

Customizing dependencies

You should use the Unity Hub to install Android SDK & NDK tools and OpenJDK to ensure that you receive the correct versions and configurations. However, there are situations where it’s useful to change the SDK, NDK, or JDK that Unity uses to build applications for Android. For example, if you have multiple versions of Unity with the same dependencies and you don’t want to duplicate the installation of the SDK, NDK, and JDK, you can specify a shared location.

To make Unity use a custom version of a dependency:

  1. Download the custom version of the dependency.
    Warning: Unity only officially supports versions of the OpenJDK, SDK, or NDK that it supplies through the Hub. For more information, see Supported dependency versions.
  2. In Unity, select Edit >Preferences (macOS: Unity >Preferences).
  3. In the left navigation column, select External Tools. The Android section of the External Tools panel contains entries for JDK, SDK, NDK, and Gradle An Android build system that automates several build processes. This automation means that many common build errors are less likely to occur. More info
    See in Glossary
    . Each entry contains:
    • A checkbox that indicates whether to use the version that Unity provides or a custom version.
    • The path to the dependency’s installation folder.
  4. To customize the installation for any of these dependencies, disable the dependency’s respective …installed with Unity (recommended) checkbox then click Browse and select the installation folder for the custom dependency.

Supported dependency versions

This section contains information on which versions of each dependency each Unity version supports. Each version of Unity requires a specific version of the Android NDK and Android JDK, but there are no exact version requirements for the Android SDK.

Unity relies on tools that the Android SDK provides and different versions of the SDK usually have the same tools available. This means you can use any recent version of the SDK since they all contain the build tools that Unity requires.

Important: The only exceptions are Android SDK Build-tools versions higher than version 30. Unity doesn’t support Android SDK Build-tools versions higher than 30.

The following table shows the NDK version that each Unity version supports:

Unity version NDK version
2019.4 LTS r19
2020.3 LTS r19
2021.2 r21d

The following table shows the JDK version that each Unity version supports:

Unity version JDK version
2019.4 LTS 8 (OpenJDK version 1.8)
2020.3 LTS 8 (OpenJDK version 1.8)
2021.2 8 (OpenJDK version 1.8)

Setting the Android SDK Target API

The Unity Hub installs the latest version of the Android SDK Target API that Google Play requires. If you need to use a more recent version, you can change it in the Android Player Settings. To do this:

  1. Select Edit >Project Settings.
  2. In the Project settings window, select the Player tab, then open Android Player Settings:
  3. In the Other Settings section, change the Target API Level.

If you select a target API version newer than the latest installed version, the Unity Android SDK Updater can automatically download and install the new version. Unity displays a prompt and you can choose to either:

  • Automatically download and install the new version of the Android SDK.
  • Continue to use the highest installed version of the Android SDK.

If you select a target API version that isn’t installed and is older than the latest installed version, the Unity Android SDK Updater can’t perform the update and Unity displays an error message. In this case, to update the Android SDK Target API, you must use the Android sdkmanager from either Android Studio or the command-line tool. Regardless of the method you choose, make sure to select the correct Android SDK folder for Unity in the Edit > Preferences > External Tools window. For more information, see Customizing dependencies.

Important: On Windows, if you installed the Unity Editor in the default folder ( /Program Files/ ), you must run the sdkmanager with elevated privilege (Run as Administrator) to perform the update.

Chrome OS

In Unity, Chrome OS is part of the Android development environment. This means you can deliver new and existing Android applications to Chrome OS. Also, since many Chrome OS devices are laptops or have a laptop mode, you can use features such as mouse and keyboard input. For more information:

  • On Chrome OS in Unity: Chrome OS.
  • On how to build an Android application for Chrome OS: Building your Chrome OS application.

Источник

Troubleshooting Android development

“No Platforms Found” error:

  1. Uninstall the current Android SDK and make sure that you don’t have more than one copy of it.
  2. Update Java with a stable version. Bear in mind the latest version shouldn’t have conflicts, but users have experienced problems in the past.
  3. Download a fresh copy of the latest ADT Bundle and install it following the instructions. This should configure the development tools correctly: http://developer.android.com/sdk/index.html
  4. Configure Unity with the installed Android SDK.

Unity fails to install your application to your device

  1. Verify that your computer can actually see and communicate with the device. See the Publishing Builds page for further details.
  2. Check the error message in the Unity console. This will often help diagnose the problem.

If you get an error saying “Unable to install APK, protocol failure” during a build then this indicates that the device is connected to a low-power USB port (perhaps a port on a keyboard or other peripheral). If this happens, try connecting the device to a USB port on the computer itself.

  1. Ensure that you are not trying to use NativeActivity with devices that do not support it.
  2. Try removing any native plugins you have.
  3. Try disabling stripping.
  4. Use adb logcat to get the crash report from your device.

Building DEX Failed

This is an error which will produce a message similar to the following:-

This is usually caused by having the wrong version of Java installed on your machine. Updating your Java installation to the latest version will generally solve this issue.

The game crashes after a couple of seconds when playing video

Make sure Settings->Developer Options->Don’t keep activities isn’t enabled on the phone. The video player is its own activity and therefore the regular game activity will be destroyed if the video player is activated.

My game quits when I press the sleep button

Change the activity tag in the AndroidManifest.xml to contain android:configChanges tag as described here.

An example activity tag might look something like this:-

Is something described here not working as you expect it to? It might be a Known Issue. Please check with the Issue Tracker at issuetracker.unity3d.com.

Copyright © 2016 Unity Technologies. Publication 5.4-X

Источник

Troubleshooting Android development

“No Platforms Found” error:

  1. Uninstall the current Android SDK and make sure that you don’t have more than one copy of it.
  2. Update Java with a stable version. Bear in mind the latest version shouldn’t have conflicts, but users have experienced problems in the past.
  3. Download a fresh copy of the latest ADT Bundle and install it following the instructions. This should configure the development tools correctly: http://developer.android.com/sdk/index.html
  4. Configure Unity with the installed Android SDK.

Unity fails to install your application to your device

  1. Verify that your computer can actually see and communicate with the device. See the Publishing Builds page for further details.
  2. Check the error message in the Unity console. This will often help diagnose the problem.

If you get an error saying “Unable to install APK, protocol failure” during a build then this indicates that the device is connected to a low-power USB port (perhaps a port on a keyboard or other peripheral). If this happens, try connecting the device to a USB port on the computer itself.

  1. Ensure that you are not trying to use NativeActivity with devices that do not support it.
  2. Try removing any native plugins you have.
  3. Try disabling stripping.
  4. Use adb logcat to get the crash report from your device.

Building DEX Failed

This is an error which will produce a message similar to the following:-

This is usually caused by having the wrong version of Java installed on your machine. Updating your Java installation to the latest version will generally solve this issue.

The game crashes after a couple of seconds when playing video

Make sure Settings->Developer Options->Don’t keep activities isn’t enabled on the phone. The video player is its own activity and therefore the regular game activity will be destroyed if the video player is activated.

My game quits when I press the sleep button

Change the activity tag in the AndroidManifest.xml to contain android:configChanges tag as described here.

An example activity tag might look something like this:-

Источник

how to install Unity Android SDK? In this lesson, I will explain the installation of the Unity Android SDK, which is necessary to develop games for Android in the UNITY 3D game engine. With Unity 2023, you can now automatically install it in Android SDK when installing the Android module. Along with the Unity SDK Manager, we may need to manually download the SDK for Google Play.

how to install unity android sdk

how to install unity android SDK

First of all, for the Android SDK to be installed, you must have Java JDK (Development Kit) installed on your system. From Java’s official website Oracle, you can supply JDK easily.

You can install the Android SDK in two ways: using Android Studio or using the Unity Hub SDK Manager. Now that the method recommended by Google is to install the SDK with Android Studio, this may be the best option. If you have developed an advanced project and are getting an API error, it may be right to choose Android Studio. In addition, the normal Unity Hub SDK installation is quite simple, but it can create problems for minimal API support for Google Play in the future.

How to Install Unity Android SDK?

To make the games or applications that you are developing with Unity 3D compatible with Google Play, you need to install the most up-to-date Android SDK (Software Development Kit). Although the processes are simple, the installation of Android Studio has become mandatory.

1. Unity Hub

The installation of the Unity Hub SDK, which is our first process, has been made very simple. With Unity Hub, you can install the Android SDK with just one click, depending on the corresponding Unity version.

How to install android SDK for Unity? Let’s start:

  • Download Unity Hub Before You Start.
  • Start the Unity Hub program.
  • In the pop-up tab, just click the “Installs” tab on the left side.
  • Locate the Unity version that you are using in the pop-up window.
  • Click the ellipsis Section at the top right of the Unity version you found.
  • Immediately after that, click” Add Modules“.
  • Click on the “Android Build Support” option to install the SDK and DONE!
  • You can also select the “iOS Build Support” option to install the iOS Sdk and start the download process.

unity hub sdk installation

Unity Hub: Android SDK installation

As we can see in the photo, there are dozens of options available, and you can complete SDK installations depending on the project you are going to develop with Unity. At the top, when you install the “Android & iOS Build Support” SDK downloads, the processes will be automatically defined and you will be able to finish the necessary installations.

Unity Android Build Support > Android SDK & NDK Tools

2. Android Studio

The Android Studio SDK installation may be the best option. As an example, the Unity Hub SDK installation has maximum API support of 29, while Android Studio has 30 API support. API support is a rule enforced by Google. To keep the user experience at the highest level, the latest API Support SDK is recommended to keep it up-to-date. For this, installing the SDK with Android Studio may be the right option. Also, if you have developed an Advanced project, you can fix vague errors in your project with Debugging for Android devices.

We can switch to Android Studio Installation and SDK installations:

1. Download Android Studio

Download Android Studio right here. Please note that for the installation of the Android Studio SDK, the normal Android Studio installation must be performed.

2. Follow the Path of Android Studio SDK Manager

Immediately after installing Android Studio, you need to create a sample project. After creating the sample project, follow the path Android Studio > Top Menu > Tools-Android-SDK Manager.

Android Studio SDK Platforms – Android API 31

As you can see in the picture, the Android API 31 is not installed correctly. You can install the SDK with the most up-to-date and highest API value. We make the Android SDK 31 part tick, and after clicking the Save > OK button, the installation of the SDK with the latest version starts automatically.

3. Adding the Android SDK Path to Unity

This part is really important. If you have downloaded the most up-to-date or optional SDK with the Android SDK, do not forget about the procedures here. Immediately run a sample project with Unity. Follow the path Edit > Preferences > External Tools.

As you can see in the photo below, we have removed the option in the SDK section. And finally, at the top, we add the ‘Android SDK Location‘ section in the Android SDK installation:

Android SDK Tools Installed with Unity.

After you do this, after you close and open the Unity program, the SDK that you have installed will work successfully.

Unity Build Issue and SDK Update

When you encounter a Unity Grandle SDK Build error, you need to update the SDK. You need to use Android Studio, as we showed in the photo at the top. You will see the SDK Tools > Update option. Here we select the SDK that we want to update and use and click Save. After the download process is finished, we will be able to update and fix errors.

Install the Unity android SDK to Program Android Games with Ease

Even though Android is an open-source platform, there are many common mistakes made during installation and development that can lead to significant errors afterward. Even though Android has some of the best user interfaces available, installing a Unity Android SDK can make it even more frustrating. , many users are unaware of these common errors and the problems they cause. Fortunately, having learned them, these mistakes can be easily corrected. It is worth reading the different issues that you need to avoid so that you don’t make common mistakes with them yourself.

First of all, if you are using a normal Unity, uninstall the Android SDK built into Unity. Unity Manager must already be installed. Help to use unity manager to speed up installation and license updates. To do this, download and run the Unity Manager application, it will display the current versions and select the latest stable version. Select the correct structure to install.

If you are not satisfied with the built-in administrator and want to use a third-party SDK, there are several ways to do it. The first is to download a zip from the Google Android installer and install it on your computer. If you don’t want to install the software, you can use the system files. But if you are comfortable using Windows, the zip method is best. After downloading the zip, launch the installer and follow the on-screen instructions.

Fix the Android SDK Compatibility Issue

Before running your Android games on the Unity interface, make sure that the Android installed on your computer has at least Android version 4.4. Another way to make sure that you always have the latest official developed version, your games will work properly on your computer that has the Android Android SDK installed and other programs/software/hardware to configure it to use the same methods as the installation in use. However, if you want to install the Android SDK to run the custom development app directly from the desktop, you can download the desktop app from the Android site.

Установка android-SDK

Здравствуйте, уважаемые форумчане. Столкнулся с такой проблемой.
Что не работает: после переустановки винды не могу поставить sdk для компиляции проектов для android.
Что пробовал?
1) Скачать sdk с сайта android studio, распаковать его в папку, указать путь в Unity к этой папке (выдает ошибку Unable to List target platforms).
2) Скачать более старую версию android sdk, которая комплектовалась sdk manager (sdk manager не запускается (ни от имени администратора, ни просто так) на долю секунды открывается консоль и тут же закрывается, без каких либо ошибок и т.д.)
3) Скачать Android studio вместе с sdk. Открыл внутренний sdk manager, установил sdk для всех необходимых версий этой чудной ОС, установил sdk-tools, которые советовали в гуголе и указал путь к папке, в которую AS наставил SDK. Вылезает ошибка с пункта 1.
4) В гугле нашел пару людей с такой же проблемой, им всем якобы помогла установка sdk отсюда:

http://dl-ssl.google.com/android/repository/tools_r25.

.
Но здесь тоже sdk manager, который отказывается запускаться (смотреть пункт 1). Если просто указать в Unity путь к папке с распакованный архивом, то при компиляции вылетает ошибка Failed to build APK.

Может быть тут кто-нибудь сталкивался с подобной проблемой и знает способ, как закрыть этот порочный круг?

barskep
UNец
 
Сообщения: 19
Зарегистрирован: 16 мар 2016, 09:32

Re: Установка android-SDK

Сообщение Andrew46 10 окт 2017, 15:06

Тоже ищу ответ. Купил ноут и тоже не могу поставить SDK, хз что делать(

Andrew46
UNец
 
Сообщения: 32
Зарегистрирован: 07 сен 2017, 20:57

Re: Установка android-SDK

Сообщение Valentinus 10 окт 2017, 15:36

тут было несколько тем про установку sdk — почитайте, там как-то людям удавалось это сделать.

другое мое творчество: samlib.ru/u/us_w/

Аватара пользователя
Valentinus
Старожил
 
Сообщения: 889
Зарегистрирован: 24 мар 2017, 18:33

Re: Установка android-SDK

Сообщение Zanlek 11 окт 2017, 14:43

Такая же проблема- не могу конвертировать под андроид. ни один совет которому я следовал не помог. кратко опишу как и куда устанавливал jdk и cdk может у кого получается конвертировать по другому устанваливал
1)Jdk установил в папку Program Files. в переменную среду добавил JAVA-HOME с указанием пути папки изменил path
2)android studio установил с комплектом tools, platform-tools, buld-tools на диск С с создание отдельных папок для студио и сдк (хотя достаточно было только tools установить)
3)в unity все как положено прописал в preferenses
4)даже дополнительно установил ндк

юнити версии 2017.1.1(64). оперционка Win7 sp1(64). сдк тоолс тоже последней версии (пробовал и более ранние версии с 32 и 64 битки ставить сдк и юнити). в путях установки отсутствуют кириллицы. уж не знаю что думать может ли влиять железо на конвертацию? Процессор АМД

Zanlek
UNец
 
Сообщения: 5
Зарегистрирован: 11 окт 2017, 14:16

Re: Установка android-SDK

Сообщение seaman 11 окт 2017, 15:21

А поддержка компиляции под андроид для самой Юнити то установлена?
При установке самой Юнити выбираете платформы для каких устанавливается поддержка компиляции. Вы там Андроид выбирали?

seaman
Адепт
 
Сообщения: 8351
Зарегистрирован: 24 янв 2011, 12:32
Откуда: Самара


Re: Установка android-SDK

Сообщение lawsonilka 11 окт 2017, 20:40

только вчера вот качал android sdk tools для сборки проекта под android на windows 10 х64(купил новый ноут с ssd)
Все отлично работает. Я скачал tools в 140мб а не всю студию целых(бесполезных) 2гига, установил jdk-8 32 битную, а не 64 как обычно предлагают. Закинул android sdk tools в корневую папку диска C чтобы не было кириллицы в путях, скачал нужную версию android, указал нужные папки в юнити и все заработало с 1го раза

lawsonilka
UNIверсал
 
Сообщения: 390
Зарегистрирован: 21 окт 2014, 14:48

Re: Установка android-SDK

Сообщение aqus 30 ноя 2019, 23:54

Zanlek писал(а):https://forum.unity.com/threads/java-9-jdk-9-support-by-unity-android.499354/
короче новая версия jdk 9 пока что не совместима с сдк и юнити. у кого такая же ошибка компиляции как у автора и у меня нужно ставить jdk 8 или более раннюю версию

ДРУЖЕ! Ти єдиний хто допоміг :ymhug: :ympeace: ДЯКУЮ!!!

aqus
UNец
 
Сообщения: 1
Зарегистрирован: 30 ноя 2019, 23:51


Вернуться в Общие вопросы

Кто сейчас на конференции

Сейчас этот форум просматривают: Google [Bot] и гости: 10



Понравилась статья? Поделить с друзьями:
  • Unity runtime error
  • Unity restarts pc error
  • Unity player dll ошибка что делать
  • Unity packet manager error
  • Unity package manager error как исправить ошибку