Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Minimum platform required for build is Android 4.0 (API level 14)

Discussion in 'Android' started by Rhapsodus, Feb 15, 2012.

  1. Rhapsodus

    Rhapsodus

    Joined:
    Aug 31, 2009
    Posts:
    30
    After I updated to Unity 3.5 my android builds are now throwing an error saying there are no platforms in the SDK. The popup I am seeing is claiming the minimum platform required is now Android 4.0 but I was building to api level 7 in 3.4.2. Is there a new requirement I have to download? I am not an android developer.

    As you can see by this screenshot: I do have the Android SDK installed.

    Consequently, I noticed this was spit out in the console as well:

    Available Android targets:
    id: 1 or "android-3"
    Name: Android 1.5
    Type: Platform
    API level: 3
    Revision: 4
    Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P
    id: 2 or "android-4"
    Name: Android 1.6
    Type: Platform
    API level: 4
    Revision: 3
    Skins: HVGA, QVGA, WVGA800 (default), WVGA854
    id: 3 or "android-7"
    Name: Android 2.1-update1
    Type: Platform
    API level: 7
    Revision: 2
    Skins: HVGA, QVGA, WQVGA400, WQVGA432, WVGA800 (default), WVGA854
    id: 4 or "android-8"
    Name: Android 2.2
    Type: Platform
    API level: 8
    Revision: 2
    Skins: HVGA, QVGA, WQVGA400, WQVGA432, WVGA800 (default), WVGA854
    id: 5 or "android-9"
    Name: Android 2.3.1
    Type: Platform
    API level: 9
    Revision: 2
    Skins: HVGA, QVGA, WQVGA400, WQVGA432, WVGA800 (default), WVGA854
    id: 6 or "android-10"
    Name: Android 2.3.3
    Type: Platform
    API level: 10
    Revision: 1
    Skins: HVGA, QVGA, WQVGA400, WQVGA432, WVGA800 (default), WVGA854
    id: 7 or "android-11"
    Name: Android 3.0
    Type: Platform
    API level: 11
    Revision: 1
    Skins: WXGA (default)

    Anyone else running into this?
     
  2. Chris-Clark

    Chris-Clark

    Joined:
    Jan 16, 2012
    Posts:
    130
    In that same error you are getting, it tells you to update your Android SDK APIs. So go do that, install API level 14.

    Run the platform updater and select the newer APIs.
     
  3. Rhapsodus

    Rhapsodus

    Joined:
    Aug 31, 2009
    Posts:
    30
    Ah, Big thanks clarkster, I ran the android program in the tools folder and updated every api level and I am now building just fine.
     
  4. Tseng

    Tseng

    Joined:
    Nov 29, 2010
    Posts:
    1,217
    Yep, the Build Target 4.0 is only required so Unity can use 4.0 features. But it still can be set to run on 2.1 devices.

    The Build Target just tells which version of the framework to use. If you build against 3.2 Framework, you can only use features which are available up to 3.2. If you don't use any features which are 2.1+ you can set your "minSdkVersion" to 2.1 (that's the one you choose in Player Setting).

    In classical Android environment it's also possible to use reflection methods to look if a certain method of feature is available and dynamically add it. That's probably what unity does. This keeps it 2.1 compatible and it's still possible to use new features through reflections.
     
  5. stuartf

    stuartf

    Joined:
    Sep 5, 2010
    Posts:
    30
    Hi
    I'm having the same problem as above. Had no prblems until Unity 3.5

    I've reinstalled the Android SDK and installed 4.0 - this is showing up as installled in the SDK program and there is a folder called android-14 in the platforms folder but I'm still getting the error above and a message that no platforms are installed!

    Any advice welcome!
     
  6. TeotiGraphix

    TeotiGraphix

    Joined:
    Jan 11, 2011
    Posts:
    145
    Hi where do you have your sdks installed? Are you sure there are no permission problems with Unity? This has come up a few times and it seemed that users might have been trying to access locations where Unity doesn't have permission to access.

    Mike
     
  7. stuartf

    stuartf

    Joined:
    Sep 5, 2010
    Posts:
    30
    Hi Mike

    I just reinstalled android SDK on E Drive in Program Files (x86) - the same location it was before when it worked OK with Unity 3.4
     
  8. stuartf

    stuartf

    Joined:
    Sep 5, 2010
    Posts:
    30
    I've just uninstalled and reinstalled the Android SDK in the same folder as my Unity files ( E:/Unity) and I'm still getting the same error ...
     
  9. stuartf

    stuartf

    Joined:
    Sep 5, 2010
    Posts:
    30
    I've now tried uninstalling and reinstalling Unity 3.5 and the Android SDK with administration status for both installations and still the same problem - goott say this is getting a real pain and there doesn't seem to be any answer - tried any other suggestiions I could find on the forum . Is there any way I can be digging deepr to try and understand what might be going wrong. I had no problems with this with 3.4 and same set up ( Windows 7 home)
     
  10. TeotiGraphix

    TeotiGraphix

    Joined:
    Jan 11, 2011
    Posts:
    145
    Hi,

    Yeah I was about to reply back and advise reinstalling Unity since that might have had some preferences messing things up. Since you already did that, my only thought is there are some persistant preferences getting saved by Unity that is not allowing the SDK to be recongnized. IE A preference file or directory that is not being deleted when Unity is uninstalled.

    Mike
     
  11. stuartf

    stuartf

    Joined:
    Sep 5, 2010
    Posts:
    30
    I have now even tried:
    - uninstalling the android SDK
    - uninstalling Unity 3.5
    - reinstalling Unity 3.4
    - copying across an android SDK folder that works fine with 3.4 on my XP machine

    and I STILL get this error (only it's slightly different this time because it's expecting Android platform 9 as it's Unity 3.4) - I know it's in there cos it works on my other machine!!!
    This is the error report I get now:
    Android SDK does not include any platforms! Did you run Android SDK setup to install the platform(s)?
    Minimum platform required for build is Android 2.3 (API level 9)

    UnityEngine.Debug:LogError(Object)
    PostProcessAndroidPlayer:prepareToolPaths(String) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPipeline/PostProcessAndroidPlayer.cs:55)
    PostProcessAndroidPlayer:postProcess(BuildTarget, String, String, String, String, String, String, BuildOptions) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPipeline/PostProcessAndroidPlayer.cs:106)
    UnityEditor.HostView:OnGUI()

    I am about to give up as I can't waste any more time on this but I'm really peeved that I have paid for an Android licence which I can't now use on my Wondows 7 machine
     
  12. TeotiGraphix

    TeotiGraphix

    Joined:
    Jan 11, 2011
    Posts:
    145
    If you have a paid license, why don't you contact unity support. I am sure they would being willing to help you out. :)

    Mike
     
  13. stuartf

    stuartf

    Joined:
    Sep 5, 2010
    Posts:
    30
    Thanks for the advice and ideas Mike

    After several more hours installing and uninstalling and removing registry keys I have now given up and emailed support together with a log file and screenshots of the paths and platforms installed (at http://www.hsworlds.com/unity/androiderror.zip in case anyone can help in the meantime!)

    + if I get a resolution I'll post it here
     
  14. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    541
    I tried Unity 3.5 on Android SDK with the latest 4.x updates and compiling with minium API level6 maximum 15 (set in the Manifest) didn't give me problems at present.

    This looks like some sort of problems related to windows7 and newest java runtime machine. Just guessing.
    I'm on a Mac
     
  15. stuartf

    stuartf

    Joined:
    Sep 5, 2010
    Posts:
    30
    Hi Litobyte

    I seem to be running Java 7 64 bit and the android sdks checks this and says it's ok before reinstalling it (for the nth. time!)

    When you say set the maxium API level as 15 where are you choosing that setting ( I can only see 14 as a maxiumum option in my drop down list)?
     
  16. stuartf

    stuartf

    Joined:
    Sep 5, 2010
    Posts:
    30
    Problem solved ( at last)

    I had initially installed Java 6 (32 bit) but must have somehow installed 64 bit of version 7 later on on ?update.

    Although Android SDK recognises V7 64 as acceptable when installing the SDK I don't think Unity 3.5 does!

    Java 32 bit now installed and seems OK - phew!!!

    Hope this helps someone else!!!
     
  17. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    541
    You can set the required min and max API level from the manifest.
    Of course Unity 3.5 isn't aware of new ones.

    I have a unity 3.5.x project to port to Android, do you know if there is any issue with the newest Android sdk 22 revision ?

    Thanks in advance guys
     
  18. shrapnel92

    shrapnel92

    Joined:
    May 17, 2014
    Posts:
    10
    Sorry to bring this thread back from the dead, but I'm having this very error, I'm brand new to Android development so I'm not entirely sure what's going on/how to resolve it. I'd really appreciate it if anyone could lend a hand because my whole project has ground to a halt until I can fix this!

    When I build&run my project it throws the ' Minimum platform required for build is Android 4.0 (API level 14)' error, so I click 'Update SDK', and it just gets stuck in a loop and provides me with the same error prompt over and over. I've tried reinstalling my SDK to no avail, and it's not prompting me for updates which makes me think it is at least Android 14, so does anyone have any idea why Unity would be giving me this error?

    Thanks!

    Edit:
    I don't know if this means anything but I just noticed something under the 'Extras' in my SDK manager called 'Broken ARM EABI v7a System Image, API 19', I'm going to guess this is some kind of erroneous file - could this be causing problems?

    Double Edit:
    I unpacked the adt bundle and then just pointed Unity to that as the Android SDK directory and it works, so please ignore this post!
     
    Last edited: May 29, 2014