I got this error after updating to 5.8.1, Version: 4.20.1.0 (Indie Edition), on Mac
Binary XML file line #1: Error inflating class android.support.v7.widget.Toolbar
All required library are included. I don't have any issue with this app before the update.
Does anyone having this issue and have a workaround to it?
Answers
Entire stack trace please.
Sorry
Is below the correct one?
[MonoDroid] UNHANDLED EXCEPTION: [MonoDroid] Android.Views.InflateException: Exception of type 'Android.Views.InflateException' was thrown. [MonoDroid] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <IL 0x00011, 0x00068> [MonoDroid] at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue[]) [0x00084] in /Users/builder/data/lanes/1353/ac29b2c6/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:896 [MonoDroid] at Android.App.Activity.SetContentView (int) [0x00070] in /Users/builder/data/lanes/1353/ac29b2c6/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.Activity.cs:4763 [MonoDroid] at Dailyvanity.Droid.MainActivity.OnCreate (Android.OS.Bundle) [0x00044] in /Users/chrissim/Xamarin Projects/Dailyvanity Mobile/Droid/MainActivity.cs:52 [MonoDroid] at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/1353/ac29b2c6/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.Activity.cs:2380 [MonoDroid] at (wrapper dynamic-method) object.eb5c055b-51dd-4514-85e8-0bac726daecd (intptr,intptr,intptr) <IL 0x00017, 0x00043> [MonoDroid] --- End of managed exception stack trace --- [MonoDroid] android.view.InflateException: Binary XML file line #1: Error inflating class android.support.v7.widget.Toolbar [MonoDroid] at android.view.LayoutInflater.createView(LayoutInflater.java:623) [MonoDroid] at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:699) [MonoDroid] at android.view.LayoutInflater.parseInclude(LayoutInflater.java:819) [MonoDroid] at android.view.LayoutInflater.rInflate(LayoutInflater.java:748) [MonoDroid] at android.view.LayoutInflater.rInflate(LayoutInflater.java:761) [MonoDroid] at android.view.LayoutInflater.inflate(LayoutInflater.java:495) [MonoDroid] at android.view.LayoutInflater.inflate(LayoutInflater.java:400) [MonoDroid] at android.view.LayoutInflater.inflate(LayoutInflater.java:353) [MonoDroid] at android.support.v7.app.ActionBarActivityDelegateBase.setContentView(ActionBarActivityDelegateBase.java:228) [MonoDroid] at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:102) [MonoDroid] at dailyvanity.droid.MainActivity.n_onCreate(Native Method) [MonoDroid] at dailyvanity.droid.MainActivity.onCreate(MainActivity.java:37) [MonoDroid] at android.app.Activity.performCreate(Activity.java:5239) [MonoDroid] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) [MonoDroid] at com.lbe.security.service.core.client.b.x.callActivityOnCreate(Unknown Source) [MonoDroid] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162) [MonoDroid] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2248) [MonoDroid] at android.app.ActivityThread.access$800(ActivityThread.java:138) [MonoDroid] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1199) [MonoDroid] at android.os.Handler.dispatchMessage(Handler.java:102) [MonoDroid] at android.os.Looper.loop(Looper.java:136) [MonoDroid] at android.app.ActivityThread.main(ActivityThread.java:5050) [MonoDroid] at java.lang.reflect.Method.invokeNative(Native Method) [MonoDroid] at java.lang.reflect.Method.invoke(Method.java:515) [MonoDroid] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:805) [MonoDroid] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:621) [MonoDroid] at dalvik.system.NativeStart.main(Native Method) [MonoDroid] Caused by: java.lang.reflect.InvocationTargetException [MonoDroid] at java.lang.reflect.Constructor.constructNative(Native Method) [MonoDroid] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [MonoDroid] at android.view.LayoutInflater.createView(LayoutInflater.java:597) [MonoDroid] ... 26 more [MonoDroid] Caused by: java.lang.NoSuchMethodError: android.support.v4.content.ContextCompat.getDrawable [MonoDroid] at android.support.v7.internal.widget.TintManager.getDrawable(TintManager.java:133) [MonoDroid] at android.support.v7.internal.widget.TintTypedArray.getDrawable(TintTypedArray.java:62) [MonoDroid] at android.support.v7.widget.Toolbar.<init>(Toolbar.java:249) [MonoDroid] at android.support.v7.widget.Toolbar.<init>(Toolbar.java:191) [MonoDroid] ... 29 more [libc] Fatal signal 6 (SIGABRT) at 0x0000736e (code=-6), thread 29550 (yvanity.android)
Sorry, not sure what's the issue but I redownload the studio/android to install and it work.
Think my studio auto update have some issues.
I am also facing the same issue.Any help?
Can someone please let me know about any fix for this issue??
Also the same issue...
If I remember correctly, you need to make sure the view files are pointing to the correct toolbar widget. For my case, I reinstall everything and change the layout theme to default and it work.
So I guess there are some mapping issue with the theme?
Can someone please let me know about any fix for this issue??
<android.support.v7.internal.widget.ActionBarContainer
android:id="@+id/action_bar_container" (have a error at this line)
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
style="?attr/actionBarStyle"
android:touchscreenBlocksFocus="true"
android:gravity="top">
check in manifest if the themes are declared
application android:label="ASM" android:theme="@style/MyTheme"
the same issue....
same problem here...
https://forums.xamarin.com/discussion/67000/error-inflating-class-android-support-v7-widget-toolbar-after-updaring-to-v7-appcompat-version-23-3
I also did everything in example but didn't work
so i added this
... MainLauncher = true, Theme ="@style/AppTheme", ... and worked!!!
i got Error in xamarin cross plateform
Android.Views.InflateException: Binary XML file line #1: Error inflating class android.support.v7.widget.Toolbar
please help me
I GOT THE SAME ERROR, BUT TRYING ALL DIFFERENT THINGS SUGGESTED IN DIFFERENT THREADS IN DIFFERENT LOCATIONS I TRIED BELOW.
THIS WORKED FOR ME.
DELETED "Xamarin.Android.Support.v7.AppCompat" FOLDER FROM LOCATION
"C:\Users\\AppData\Local\Xamarin"
THIS IS FOR WINDOWS NOT SURE ABOUT IF YOU ARE DEVELOPING IN MAC MACHINE
Still doesn't work for me. All I did was create a blank project and I get same error.
I can't even compile, since I don't have AppTheme and only the default MainTheme, found in the blank project.
I found that this error occurs only when running on an API 22 virtual device. It doesn't occur when I deploy to an API 19 virtual device. I'm using the default blank project generated by VS2015 without any modifications.
@MichaelCheng I had same problem with you. I had to uninstall the XF, delete bin/obj folder, restart VS, install back the XF, rebuild whole solution. Try if it fixes your problem
Guess what, @red49. It works! Thanks a lot!
@red49, Same problem here. You solved! Thanks!
By default there are 2 dependencies missing in clean xf droid project:
1. Xamarin.Android.Support.Animated.Vector.Drawable
2. Xamarin.Android.Support.Vector.Drawable
you need to add them using npm and everything will work
With XF I assume you mean Xamarin Forms? Does anyone have this issue and is not using Xamarin Forms?
Helo All,
I had same issue, but resolved smoothly by updating xamarin forms version for all plateforms(PCL,Android, IOS) from version 2.3.3.180 to 2.3.3.193.
I think this error comes always for android version 5.x and may be the region for that is xamarin 2.3.3.180 is not compatible with Xamarin.Android.Support.v7.AppCompat( version 23.3.0) in android 5.x, Try to update xamarin version(you can downgrad or upgrad both ) can work and restart VS after.