Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Discussion Android 4.1 support

Discussion in 'Android' started by Kostyan_Sigaev, Mar 2, 2024.

  1. Kostyan_Sigaev

    Kostyan_Sigaev

    Joined:
    Jan 10, 2022
    Posts:
    11
    I searched for useful information in the "Editor\Data\PlaybackEngines\AndroidPlayer" files and was able to find files with the following contents:

    platforms.mk:
    Code (JavaScript):
    1. NDK_MIN_PLATFORM_LEVEL := 16
    2. NDK_MAX_PLATFORM_LEVEL := 30
    3. NDK_PLATFORM_ALIAS_20 := android-19
    4. NDK_PLATFORM_ALIAS_25 := android-24
    5. NDK_PLATFORM_ALIAS_J := android-16
    6. NDK_PLATFORM_ALIAS_J-MR1 := android-17
    7. NDK_PLATFORM_ALIAS_J-MR2 := android-18
    8. NDK_PLATFORM_ALIAS_K := android-19
    9. NDK_PLATFORM_ALIAS_L := android-21
    10. NDK_PLATFORM_ALIAS_L-MR1 := android-22
    11. NDK_PLATFORM_ALIAS_M := android-23
    12. NDK_PLATFORM_ALIAS_N := android-24
    13. NDK_PLATFORM_ALIAS_N-MR1 := android-24
    14. NDK_PLATFORM_ALIAS_O := android-26
    15. NDK_PLATFORM_ALIAS_O-MR1 := android-27
    16. NDK_PLATFORM_ALIAS_P := android-28
    17. NDK_PLATFORM_ALIAS_Q := android-29
    18. NDK_PLATFORM_ALIAS_R := android-30
    19.  
    platforms.cmake:
    Code (JavaScript):
    1. set(NDK_MIN_PLATFORM_LEVEL "16")
    2. set(NDK_MAX_PLATFORM_LEVEL "30")
    3. set(NDK_PLATFORM_ALIAS_20 "android-19")
    4. set(NDK_PLATFORM_ALIAS_25 "android-24")
    5. set(NDK_PLATFORM_ALIAS_J "android-16")
    6. set(NDK_PLATFORM_ALIAS_J-MR1 "android-17")
    7. set(NDK_PLATFORM_ALIAS_J-MR2 "android-18")
    8. set(NDK_PLATFORM_ALIAS_K "android-19")
    9. set(NDK_PLATFORM_ALIAS_L "android-21")
    10. set(NDK_PLATFORM_ALIAS_L-MR1 "android-22")
    11. set(NDK_PLATFORM_ALIAS_M "android-23")
    12. set(NDK_PLATFORM_ALIAS_N "android-24")
    13. set(NDK_PLATFORM_ALIAS_N-MR1 "android-24")
    14. set(NDK_PLATFORM_ALIAS_O "android-26")
    15. set(NDK_PLATFORM_ALIAS_O-MR1 "android-27")
    16. set(NDK_PLATFORM_ALIAS_P "android-28")
    17. set(NDK_PLATFORM_ALIAS_Q "android-29")
    18. set(NDK_PLATFORM_ALIAS_R "android-30")
    19.  
    platforms.json:
    Code (JavaScript):
    1. {
    2.   "min": 16,
    3.   "max": 30,
    4.   "aliases": {
    5.     "20": 19,
    6.     "25": 24,
    7.     "J": 16,
    8.     "J-MR1": 17,
    9.     "J-MR2": 18,
    10.     "K": 19,
    11.     "L": 21,
    12.     "L-MR1": 22,
    13.     "M": 23,
    14.     "N": 24,
    15.     "N-MR1": 24,
    16.     "O": 26,
    17.     "O-MR1": 27,
    18.     "P": 28,
    19.     "Q": 29,
    20.     "R": 30
    21.   }
    22. }
    Also in the "Editor\Data\PlaybackEngines\AndroidPlayer\NDK\platforms" folder I found the corresponding folders. Based on what I found, I can assume that theoretically Unity can support Android API 16, i.e. Android 4.1 Jelly Bean. But in Player Settings there is only a minimum of API 22.

    Actually, the question itself: is there any way to activate this API 16?

    I realize that many of its users have old smartphones and tablets on Android 4, I myself have a lot of them. I also have a BlackBerry Passport with Android 4.3 support and I would be very interested in running my games on it...
    I think for fans of old Android devices this topic might be interesting....
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,933
    I mean you can export gradle project and change to whatever min api level you like from gradle project, and it might even run on the phone, but:
    * You might get a runtime exception on Android 4.3, where Unity calls Java API level which is available only starting from API 22
    * If your application crashes on Android 4.3, and it's a Unity bug, Unity won't be fixing such bugs, since officially we don't support such API level.