Xamarin.Android - Android SDK API Level 15 Missing

jondick's Avatar

jondick

12 Nov, 2015 06:38 PM

Hey folks, trying to build ZXing.Net.Mobile and getting an error that the Android SDK is missing API Level 15. Could you please install these? It would probably a good idea to install *all* API levels available (and regularly keep the SDK updated too).

Thanks!!

"C:\projects\zxing-net-mobile\Samples\Android\Sample.Android.sln" (Build target) (1) ->
"C:\projects\zxing-net-mobile\src\ZXing.Net.Mobile\ZXing.Net.Mobile.Android.csproj" (default target) (2) ->
(_ValidateAndroidPackageProperties target) ->
  C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(414,2): error : Could not find android.jar for API Level 15. This means the Android SDK platform for API Level 15 is not installed. Either install it in the Android SDK Manager (Tools > Open Android SDK Manager...), or change your Xamarin.Android project to target an API version that is installed. (C:\Program Files (x86)\Android\android-sdk\platforms\android-15\android.jar missing.) [C:\projects\zxing-net-mobile\src\ZXing.Net.Mobile\ZXing.Net.Mobile.Android.csproj]
 
    383 Warning(s)

  1. Support Staff 1 Posted by Feodor Fitsner on 12 Nov, 2015 06:54 PM

    Feodor Fitsner's Avatar

    You can use this PowerShell script to install missing SDK: https://gist.github.com/FeodorFitsner/f6ee1b9f73e73e17192b

  2. 2 Posted by jondick on 12 Nov, 2015 08:50 PM

    jondick's Avatar

    Perfect, that will do just fine, thank you!

  3. 3 Posted by JP Hellemons on 17 May, 2018 10:24 AM

    JP Hellemons's Avatar

    It somehow didn't work for me:
    & : The term 'C:\Users\appveyor\AppData\Local\Android\android-sdk\tools\android' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
    verify that the path is correct and try again.
    At line:5 char:17
    + $output = & $AndroidToolPath list sdk --all
    + ~~~~~~~~~~~~~~~~
        + CategoryInfo : ObjectNotFound: (C:\Users\appvey...k\tools\android:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
     
    Install-AndroidSDK : Cannot bind argument to parameter 'sdks' because it is null.
    At line:31 char:26
    + Install-AndroidSDK -sdks $sdks
    + ~~~~~
        + CategoryInfo : InvalidData: (:) [Install-AndroidSDK], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Install-AndroidSDK
     
    Command executed with exception: Cannot bind argument to parameter 'sdks' because it is null.

  4. Support Staff 4 Posted by Owen McDonnell on 17 May, 2018 04:07 PM

    Owen McDonnell's Avatar

    Hi JP,
    Try uncommenting the first line of that script and commenting out the second line.

  5. 5 Posted by JP Hellemons on 18 May, 2018 06:51 AM

    JP Hellemons's Avatar

    Thank you Owen, I did that. installing the sdk's takes some time. So I think that resolved it! (since I am still waiting the build to complete) will update if it did not.

  6. 6 Posted by JP Hellemons on 18 May, 2018 07:20 AM

    JP Hellemons's Avatar

    It's now over 35 minutes busy installing the android sdk (15) (I changed the 10 on this line to 15 https://gist.github.com/FeodorFitsner/f6ee1b9f73e73e17192b#file-install-android-sdk-ps1-L30) is this still normal? or did I break it?

  7. 7 Posted by JP Hellemons on 18 May, 2018 08:32 AM

    JP Hellemons's Avatar

    "Build execution time has reached the maximum allowed time for your plan (60 minutes)." so it failed.

  8. Support Staff 8 Posted by Ilya Finkelshte... on 18 May, 2018 07:18 PM

    Ilya Finkelshteyn's Avatar

    @JP Hellemons we extended it to 90 minutes for your account. Please try and let us know how it goes.

  9. 9 Posted by JP Hellemons on 22 May, 2018 07:54 AM

    JP Hellemons's Avatar

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac