Before you begin to develop an Android application in Unity, check Unity’s requirements and compatibility information for Android to make sure you’re aware of any limitations for developing a Unity application for this platform.
Unity supports Android 5.1 “Lollipop” (API level 22) and above. For more information, refer to AndroidSdkVersions.
Android devices support Vulkan and OpenGL ES. This section contains information about the graphics APIs Unity supports for Android.
Graphics API | Support |
---|---|
Vulkan | Yes |
OpenGL ES 1.0 | No |
OpenGL ES 1.1 | No |
OpenGL ES 2.0 | Yes (1) |
OpenGL ES 3.0 | Yes |
OpenGL ES 3.1 | Yes |
OpenGL ES 3.2 | Yes |
Notes:
Unity doesn’t include OpenGL ES 2.0 in its built-in set of graphics APIs for Android by default. To add support for OpenGL ES 2.0:
If you upgrade an old project that uses Auto Graphics API to a Unity version that doesn’t include OpenGL ES 2.0 by default, then Unity disables Auto Graphics API and manually adds OpenGL ES 2.0 to the list.
Not every render pipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary is compatible with Android due to hardware and graphics API limitations.
Feature | Built-in Render Pipeline | Universal Render Pipeline | High Definition Render Pipeline | Custom Scriptable Render Pipeline |
---|---|---|---|---|
Android | Yes | Yes | No | Yes |
This section contains compatibility information on Android App Manifest element attributes.
singleTask
launchMode.Unity doesn’t support Android emulators. To test your application, you can:
The standard texture compressionA method of storing data that reduces the amount of storage space it requires. See Texture Compression, Animation Compression, Audio Compression, Build Compression.
See in Glossary formats on Android are Ericsson Texture Compression (ETC) and Adaptable Scalable Texture Compression (ASTC). To target the widest range of Android devices, use one of these texture compression3D Graphics hardware requires Textures to be compressed in specialized formats which are optimized for fast Texture sampling. More info
See in Glossary formats. Unity’s default texture compression format is ASTC. If an Android device doesn’t support the texture compression format you use for a texture, Unity decompresses the texture at runtime. This increases memory usage and decreases rendering speed.
A subset of Android devices support the DXT and PVRTC texture compression formats. These formats support textures with an alpha channel as well as high compression rates or high image quality. For digital distribution services that filter content based on texture compression format, it is best practice to create separate builds of your application for each texture compression format.
There are two ways to change the default texture compression format for your application:
The value you set in Build Settings has priority over the one you set in Player Settings. Use it to change the texture compression format for a particular build.
You can also customize the texture compression format for individual textures. The value you set for an individual texture overridesPlatform-specific settings that allow you to set the resolution, file size with associated memory size requirements, pixel dimensions, and quality of your Textures for each target platform. More info
See in Glossary the default texture compression format value. For information on how to change the texture formatA file format for handling textures during real-time rendering by 3D graphics hardware, such as a graphics card or mobile device. More info
See in Glossary of individual textures, see Texture Importer.
This section provides additional information for playing video files on Android:
To play video files on Android, use the Video Player component. If your application tries to play a video file that the device doesn’t support, Unity doesn’t play the video.
You can use any resolution or number of audio channels so long as the target device supports them. Note: Not all devices support resolutions greater than 640 × 360.
Unity supports playback from uncompressed asset bundles. For Android Pie and above, Unity supports playback from compressed asset bundles.
Unity doesn’t support native webM/VP8 transparency. To play VP8-encoded webM clips with transparency, transcode the clips to a supported format.
In Android versions prior to 6.0.1
, videos with transparency that have a higher resolution than the device support render pixelsThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More info
See in Glossary outside the supported resolution as white.
Unity reports format compatibility issues in the adb logcat
output and prefixes them with AndroidVideoMedia
. This file might display other device-specific error messages near the video format issues Unity reports. These device-specific errors aren’t visible to Unity and often explain what the compatibility issue is.
Unity supports devices with 16 KB memory page sizes, a feature introduced in Android 15. For more information about the feature, refer to the Android documentation on Support 16 KB page sizes.
Unity applications built for devices with 4 KB memory page size might not work on devices with 16 KB memory page size. To ensure your application is compatible with the devices that use 16 KB memory page size, consider the following key points:
.so
file that’s aligned to 4 KB instead of 16 KB, the Unity Editor displays a warning during the build process.Note: The following issue only occurs when developing on a Windows machine.
There is a bug with sdkmanager.bat
in Android Command-line Tools 2.1 that causes the following tool invocation error:
Error: Could not find or load main class Files\Unity3D\2021.3.34f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\cmdline-tools\2.1\bin\\..
Use the following suggestions to resolve this issue:
SDK\cmdline-tools\2.1\bin\sdkmanager.bat
file with a text editor. Change the following line:set DEFAULT_JVM_OPTS=-Dcom.android.sdklib.toolsdir=%~dp0\..
and add a pair of quotation marks around -Dcom.android.sdklib.toolsdir=%~dp0\..
:
set DEFAULT_JVM_OPTS="-Dcom.android.sdklib.toolsdir=%~dp0\.."
Install Unity into a path without any whitespace. By default, Unity installs into the Program Files
directory, which has a whitespace in the pathname.
Update to Unity 2022.3 or newer. Newer Unity versions use an updated command line tools version where this issue isn’t present.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.