The method SetTextAppearance(int resId) used in BottomBarBadge's constructor has only been introduced in API level 23, leading to a MethodNotFoundException when constructing a new instance on a device running API level 22 or lower.
Exception:
Java.Lang.NoSuchMethodError: no method with name='setTextAppearance' signature='(I)V' in class Landroid/widget/TextView; at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/2923/52635947/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 at Java.Interop.JniEnvironment+InstanceMethods.GetMethodID (JniObjectReference type, System.String name, System.String signature) [0x00068] in /Users/builder/data/lanes/3340/4e275588/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11240 at Java.Interop.JniType.GetInstanceMethod (System.String name, System.String signature) [0x0000f] in /Users/builder/data/lanes/3340/4e275588/source/Java.Interop/src/Java.Interop/Java.Interop/JniType.cs:228 at Java.Interop.JniPeerMembers+JniInstanceMethods.GetMethodInfo (System.String encodedMember) [0x0003a] in /Users/builder/data/lanes/3340/4e275588/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods.cs:94 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0004f] in /Users/builder/data/lanes/3340/4e275588/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:30 at Android.Widget.TextView.SetTextAppearance (Int32 resId) [0x00017] in /Users/builder/data/lanes/3340/4e275588/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Widget.TextView.cs:5781 at BottomNavigationBar.BottomBarBadge..ctor (Android.Content.Context context, Int32 position, Color backgroundColor) [0x00045] in <filename unknown>:0 at BottomNavigationBar.BottomBarBadge..ctor (Android.Content.Context context, Int32 position, Android.Views.View tabToAddTo, Color backgroundColor) [0x00000] in <filename unknown>:0 at BottomNavigationBar.BottomBar.MakeBadgeForTabAt (Int32 tabPosition, Color backgroundColor, Int32 initialCount) [0x00074] in <filename unknown>:0 at BSiBankingXamarin.UI.Droid.NMBottomBarActivity1[TViewModel].ConfigureAndAddBottomBar (Android.OS.Bundle savedInstanceState) [0x000cf] in /Users/bb/Development/NEXT/BSiBankingXamarin/BSiBankingXamarin.UI.Droid/Classes/Views/_Base/NMBottomBarActivity.cs:64
at BSiBankingXamarin.UI.Droid.NMBottomBarActivity1[TViewModel].OnPostCreate (Android.OS.Bundle savedInstanceState) [0x0000a] in /Users/bb/Development/NEXT/BSiBankingXamarin/BSiBankingXamarin.UI.Droid/Classes/Views/_Base/NMBottomBarActivity.cs:37 at BSiBankingXamarin.UI.Droid.TabRootView.OnPostCreate (Android.OS.Bundle savedInstanceState) [0x00003] in /Users/bb/Development/NEXT/BSiBankingXamarin/BSiBankingXamarin.UI.Droid/Classes/Views/Activities/TabRootView.cs:63 at Android.App.Activity.n_OnPostCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) [0x00011] in /Users/builder/data/lanes/3340/4e275588/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.App.Activity.cs:3445 at at (wrapper dynamic-method) System.Object:d283efd6-cfaf-4d2a-942a-ca91f57dc5db (intptr,intptr,intptr) at --- End of managed exception stack trace --- at java.lang.NoSuchMethodError: no method with name='setTextAppearance' signature='(I)V' in class Landroid/widget/TextView; at at md50be6f6596e887576060a6837af1be24a.TabRootView.n_onPostCreate(Native Method) at at md50be6f6596e887576060a6837af1be24a.TabRootView.onPostCreate(TabRootView.java:39) at at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1150) at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2178) at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) at at android.app.ActivityThread.access$800(ActivityThread.java:135) at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at at android.os.Handler.dispatchMessage(Handler.java:102) at at android.os.Looper.loop(Looper.java:136) at at android.app.ActivityThread.main(ActivityThread.java:5017) at at java.lang.reflect.Method.invokeNative(Native Method) at at java.lang.reflect.Method.invoke(Method.java:515) at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) at at dalvik.system.NativeStart.main(Native Method)
The method
SetTextAppearance(int resId)
used in BottomBarBadge's constructor has only been introduced in API level 23, leading to a MethodNotFoundException when constructing a new instance on a device running API level 22 or lower.Exception:
Java.Lang.NoSuchMethodError: no method with name='setTextAppearance' signature='(I)V' in class Landroid/widget/TextView; at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/2923/52635947/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 at Java.Interop.JniEnvironment+InstanceMethods.GetMethodID (JniObjectReference type, System.String name, System.String signature) [0x00068] in /Users/builder/data/lanes/3340/4e275588/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11240 at Java.Interop.JniType.GetInstanceMethod (System.String name, System.String signature) [0x0000f] in /Users/builder/data/lanes/3340/4e275588/source/Java.Interop/src/Java.Interop/Java.Interop/JniType.cs:228 at Java.Interop.JniPeerMembers+JniInstanceMethods.GetMethodInfo (System.String encodedMember) [0x0003a] in /Users/builder/data/lanes/3340/4e275588/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods.cs:94 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0004f] in /Users/builder/data/lanes/3340/4e275588/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:30 at Android.Widget.TextView.SetTextAppearance (Int32 resId) [0x00017] in /Users/builder/data/lanes/3340/4e275588/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Widget.TextView.cs:5781 at BottomNavigationBar.BottomBarBadge..ctor (Android.Content.Context context, Int32 position, Color backgroundColor) [0x00045] in <filename unknown>:0 at BottomNavigationBar.BottomBarBadge..ctor (Android.Content.Context context, Int32 position, Android.Views.View tabToAddTo, Color backgroundColor) [0x00000] in <filename unknown>:0 at BottomNavigationBar.BottomBar.MakeBadgeForTabAt (Int32 tabPosition, Color backgroundColor, Int32 initialCount) [0x00074] in <filename unknown>:0 at BSiBankingXamarin.UI.Droid.NMBottomBarActivity
1[TViewModel].ConfigureAndAddBottomBar (Android.OS.Bundle savedInstanceState) [0x000cf] in /Users/bb/Development/NEXT/BSiBankingXamarin/BSiBankingXamarin.UI.Droid/Classes/Views/_Base/NMBottomBarActivity.cs:64 at BSiBankingXamarin.UI.Droid.NMBottomBarActivity1[TViewModel].OnPostCreate (Android.OS.Bundle savedInstanceState) [0x0000a] in /Users/bb/Development/NEXT/BSiBankingXamarin/BSiBankingXamarin.UI.Droid/Classes/Views/_Base/NMBottomBarActivity.cs:37 at BSiBankingXamarin.UI.Droid.TabRootView.OnPostCreate (Android.OS.Bundle savedInstanceState) [0x00003] in /Users/bb/Development/NEXT/BSiBankingXamarin/BSiBankingXamarin.UI.Droid/Classes/Views/Activities/TabRootView.cs:63 at Android.App.Activity.n_OnPostCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) [0x00011] in /Users/builder/data/lanes/3340/4e275588/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.App.Activity.cs:3445 at at (wrapper dynamic-method) System.Object:d283efd6-cfaf-4d2a-942a-ca91f57dc5db (intptr,intptr,intptr) at --- End of managed exception stack trace --- at java.lang.NoSuchMethodError: no method with name='setTextAppearance' signature='(I)V' in class Landroid/widget/TextView; at at md50be6f6596e887576060a6837af1be24a.TabRootView.n_onPostCreate(Native Method) at at md50be6f6596e887576060a6837af1be24a.TabRootView.onPostCreate(TabRootView.java:39) at at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1150) at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2178) at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) at at android.app.ActivityThread.access$800(ActivityThread.java:135) at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at at android.os.Handler.dispatchMessage(Handler.java:102) at at android.os.Looper.loop(Looper.java:136) at at android.app.ActivityThread.main(ActivityThread.java:5017) at at java.lang.reflect.Method.invokeNative(Native Method) at at java.lang.reflect.Method.invoke(Method.java:515) at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) at at dalvik.system.NativeStart.main(Native Method)