0
votes

I already set all Api versions to Api 23 in the Android project properties, but it doesn't seems to help. This is the errorcode I always get:

Could not find android.jar for API Level 25. This means the Android SDK platform for API Level 25 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-25\android.jar missing.)

I already tried to switch to Api Version 25 but I don't get an update for Xamarin.Forms and therefore I can't update the other packages.


Edit: If I update the SDK to Level 25 and try to deploy I receive the following Errors: List of the errors

The error occurs in the file style.xml:

<?xml version="1.0" encoding="utf-8" ?>
<resources>
  <style name="MainTheme" parent="MainTheme.Base">
  </style>
   <!--Base theme applied no matter what API--> 
   <style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
     <!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
     <item name="windowNoTitle">true</item>
     <!--We will be using the toolbar so no need to show ActionBar-->
     <item name="windowActionBar">false</item>
     <!--Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette 
     colorPrimary is used for the default action bar background--> 
     <item name="colorPrimary">#2196F3</item>
     <!--colorPrimaryDark is used for the status bar--> 
     <item name="colorPrimaryDark">#1976D2</item>
     <!--colorAccent is used as the default value for colorControlActivated
     which is used to tint widgets--> 
     <item name="colorAccent">#FF4081</item>
     <!--You can also set colorControlNormal, colorControlActivated
     colorControlHighlight and colorSwitchThumbNormal.--> 
     <item name="windowActionModeOverlay">true</item>

     <item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
  </style>

  <style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
    <item name="colorAccent">#FF4081</item>
  </style>
</resources>
1
What exactly is the problem with switching to API version 25? Xamarin.Forms already supports that, is your Xamarin installation up to date? - Timo Salomäki
I installed Xamarin a week ago so it should be up to date. My Problem is that I don't recieve the Xamarin.Forms (current Version: 2.3.3.180) update and therefore can't update to Api25 - Dieter Müller
When you open the Android SDK Manage, do you have the API 25 SDK installed? If so, do you have Java JDK 8 installed? If so make sure the JDK 8 folder is selected in the Android properties window within Xamarin Studio or Visual Studio (let me know if you need help finding the setting and also which IDE you are using). Finally, did you ever update any of the Xamarin.Android libraries manually? You should only every update the Xamarin Forms library and let that update the Xamarin.Android libraries. - hvaughan3
Ok, thx. I never updated a package manually - Dieter Müller

1 Answers

0
votes

If you already changed the API Version, try to install the Nougat 7.1 SDK (Api Level 25). If that is already done, clean %USER%\AppData\Local\Xamarin, clean your solution and install what you need.