Could not convert instance of type "Android.Support.V7.Widget.AppCompatTextView" to type "Android.Support.V7.Widget.Toolbar" android 7.0

I am running an app on a device and I get this error when it starts on Android 7.0

I am using the following versions:

enter image description here

My xamarin version:

enter image description here

<?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">true</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">#39b549</item>
    <!-- colorPrimaryDark is used for the status bar -->
    <item name="colorPrimaryDark">#4d4d4d</item>
    <!-- colorAccent is used as the default value for colorControlActivated
         which is used to tint widgets -->
    <item name="colorAccent">#4d4d4d</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">#39b549</item>
  </style>

  <style name="MyTheme.Base" parent="Theme.AppCompat.Light">
  </style>

  <style name="MyTheme.Splash" parent ="Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowBackground">@drawable/splash_screen_jpg</item>
  </style>
</resources>

      

I do not know what is the reason for this erro, I even know where to find more things to give. Works fine on other versions of Android.

+3
c # xamarin xamarin.android


source to share


No one has answered this question yet

Check out similar questions:

640
How to create a new instance of an object from a Type
five
Xamarin - Resource not found which matches
five
What is the difference between colorPrimary and colorPrimaryDark in themes
2
"Resource not found ..." while trying to compose an empty Xamarin cross-platform application
0
The Xamarin.Forms Android project is developed and run locally on two machines; crash in Visual Studio Team Services
0
Building error NU1202 Xamarin.Android.Support.XXXX is not compatible with monoandroid51
0
Xamarin: Unable to convert instance of type Android.Widget.LinearLayout to input Android.Support.V7.Widget.Toolbar
0
Failed to build Xamarin Android app after Nuget package update
0
Xamarin compilation error: resource not found



All Articles
Loading...
X
Show
Funny
Dev
Pics