In xamarin.android After migration all the libraries from android to androidx facing exception errors inflating class androidx.appcompat.widget.FitWindowsLinearLayout"

Mecharla, Supriya 1 Reputation point
2022-04-11T05:14:03.437+00:00

at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0008e] in <00c315a988634383b446eff646084784>:0
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00063] in <00c315a988634383b446eff646084784>:0
at Android.App.Activity.SetContentView (System.Int32 layoutResID) [0x00018] in /Users/builder/azdo/_work/1/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-28/mcw/Android.App.Activity.cs:5595
at Saur.TimesheetApp.Mobile.Views.Droid.MainLayoutHolderExtensions.SetContentView[TLayoutHolder] (Android.App.Activity activity) [0x00007] in C:\Feuille Pointage App Mobile\Saur.TimesheetApp.Mobile\Saur.TimesheetApp.Mobile.Views.Droid\obj\Debug\90\Layouts\Layouts.g.cs:20
at Saur.TimesheetApp.Mobile.Views.Droid.ActivityBase`2[TViewModel,TLayoutHolder].OnCreate (Android.OS.Bundle savedInstanceState) [0x00009] in C:\Feuille Pointage App Mobile\Saur.TimesheetApp.Mobile\Saur.TimesheetApp.Mobile.Views.Droid\ActivityBase.cs:75
at Saur.TimesheetApp.Mobile.Views.Droid.Activities.TimesheetHistoryActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x00002] in C:\Feuille Pointage App Mobile\Saur.TimesheetApp.Mobile\Saur.TimesheetApp.Mobile.Views.Droid\Activities\TimesheetHistoryActivity.cs:30
--- End of managed Android.Views.InflateException stack trace ---
android.view.InflateException: Binary XML file line #17 in com.saur.timesheet.debug:layout/abc_screen_simple: Binary XML file line #17 in com.saur.timesheet.debug:layout/abc_screen_simple: Error inflating class androidx.appcompat.widget.FitWindowsLinearLayout
Caused by: android.view.InflateException: Binary XML file line #17 in com.saur.timesheet.debug:layout/abc_screen_simple: Error inflating class androidx.appcompat.widget.FitWindowsLinearLayout
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Field.get(java.lang.Object)' on a null object reference
at uk.co.chrisjenx.calligraphy.ReflectionUtils.getValue(ReflectionUtils.java:29)
at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.createCustomViewInternal(CalligraphyLayoutInflater.java:203)
at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.access$000(CalligraphyLayoutInflater.java:20)
at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater$PrivateWrapperFactory2.onCreateView(CalligraphyLayoutInflater.java:302)
at android.view.LayoutInflater$FactoryMerger.onCreateView(LayoutInflater.java:237)
at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1067)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:995)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:959)
at android.view.LayoutInflater.inflate(LayoutInflater.java:657)
at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.inflate(CalligraphyLayoutInflater.java:60)
at android.view.LayoutInflater.inflate(LayoutInflater.java:532)
at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:923)
at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:809)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:696)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:195)
at crc64e1b782163e49158f.TimesheetHistoryActivity.n_onCreate(Native Method)
at crc64e1b782163e49158f.TimesheetHistoryActivity.onCreate(TimesheetHistoryActivity.java:38)
at android.app.Activity.performCreate(Activity.java:8198)
at android.app.Activity.performCreate(Activity.java:8182)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3765)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3968)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8512)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,326 questions
{count} votes