Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when attempting to set items #19

Closed
BergQuester opened this issue Aug 14, 2016 · 1 comment
Closed

Crash when attempting to set items #19

BergQuester opened this issue Aug 14, 2016 · 1 comment

Comments

@BergQuester
Copy link

Code in OnCreate()

_bottomBar = BottomBar.Attach(this, savedInstanceState);
_bottomBar.SetItems(new BottomBarTab[] { new BottomBarTab(Resource.Mipmap.Icon, "Test") });
_bottomBar.SetOnTabClickListener(this);

Crashes on the second line.

Crash:

Android.Views.InflateException: Binary XML file line #1: Binary XML file line #1: Error inflating class <unknown> ---> Android.Views.InflateException: Binary XML file line #1: Error inflating class <unknown> ---> Java.Lang.Reflect.InvocationTargetException:  ---> Java.Lang.UnsupportedOperationException: Failed to resolve attribute at index 13: TypedValue{t=0x2/d=0x7f010059 a=3}
  at --- End of managed Java.Lang.UnsupportedOperationException stack trace ---
  at java.lang.UnsupportedOperationException: Failed to resolve attribute at index 13: TypedValue{t=0x2/d=0x7f010059 a=3}
  at at android.content.res.TypedArray.getDrawable(TypedArray.java:867)
  at at android.view.View.<init>(View.java:4001)
  at at android.view.ViewGroup.<init>(ViewGroup.java:604)
  at at android.widget.FrameLayout.<init>(FrameLayout.java:115)
  at at android.widget.FrameLayout.<init>(FrameLayout.java:110)
  at at android.widget.FrameLayout.<init>(FrameLayout.java:106)
  at at java.lang.reflect.Constructor.newInstance(Native Method)
  at at android.view.LayoutInflater.createView(LayoutInflater.java:619)
  at at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)
  at at android.view.LayoutInflater.onCreateView(LayoutInflater.java:694)
  at at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762)
  at at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
  at at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
  at at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
  at at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
  at at android.view.View.inflate(View.java:20171)
  at at md58441721984586c4571cb9a14cde11b83.MainActivity.n_onCreate(Native Method)
  at at md58441721984586c4571cb9a14cde11b83.MainActivity.onCreate(MainActivity.java:30)
  at at android.app.Activity.performCreate(Activity.java:6309)
  at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
  at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2519)
  at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)
  at at android.app.ActivityThread.-wrap11(ActivityThread.java)
  at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)
  at at android.os.Handler.dispatchMessage(Handler.java:111)
  at at android.os.Looper.loop(Looper.java:207)
  at at android.app.ActivityThread.main(ActivityThread.java:5728)
  at at java.lang.reflect.Method.invoke(Native Method)
  at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
  at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
  --- End of inner exception stack trace ---
  at --- End of managed Java.Lang.Reflect.InvocationTargetException stack trace ---
  at java.lang.reflect.InvocationTargetException
  at at java.lang.reflect.Constructor.newInstance(Native Method)
  at at android.view.LayoutInflater.createView(LayoutInflater.java:619)
  at at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)
  at at android.view.LayoutInflater.onCreateView(LayoutInflater.java:694)
  at at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762)
  at at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
  at at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
  at at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
  at at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
  at at android.view.View.inflate(View.java:20171)
  at at md58441721984586c4571cb9a14cde11b83.MainActivity.n_onCreate(Native Method)
  at at md58441721984586c4571cb9a14cde11b83.MainActivity.onCreate(MainActivity.java:30)
  at at android.app.Activity.performCreate(Activity.java:6309)
  at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
  at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2519)
  at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)
  at at android.app.ActivityThread.-wrap11(ActivityThread.java)
  at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)
  at at android.os.Handler.dispatchMessage(Handler.java:111)
  at at android.os.Looper.loop(Looper.java:207)
  at at android.app.ActivityThread.main(ActivityThread.java:5728)
  at at java.lang.reflect.Method.invoke(Native Method)
  at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
  at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
  at Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 13: TypedValue{t=0x2/d=0x7f010059 a=3}
  at at android.content.res.TypedArray.getDrawable(TypedArray.java:867)
  at at android.view.View.<init>(View.java:4001)
  at at android.view.ViewGroup.<init>(ViewGroup.java:604)
  at at android.widget.FrameLayout.<init>(FrameLayout.java:115)
  at at android.widget.FrameLayout.<init>(FrameLayout.java:110)
  at at android.widget.FrameLayout.<init>(FrameLayout.java:106)
  at ... 24 more
  --- End of inner exception stack trace ---
  at --- End of managed Android.Views.InflateException stack trace ---
  at android.view.InflateException: Binary XML file line #1: Error inflating class <unknown>
  at at android.view.LayoutInflater.createView(LayoutInflater.java:645)
  at at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)
  at at android.view.LayoutInflater.onCreateView(LayoutInflater.java:694)
  at at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762)
  at at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
  at at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
  at at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
  at at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
  at at android.view.View.inflate(View.java:20171)
  at at md58441721984586c4571cb9a14cde11b83.MainActivity.n_onCreate(Native Method)
  at at md58441721984586c4571cb9a14cde11b83.MainActivity.onCreate(MainActivity.java:30)
  at at android.app.Activity.performCreate(Activity.java:6309)
  at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
  at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2519)
  at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)
  at at android.app.ActivityThread.-wrap11(ActivityThread.java)
  at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)
  at at android.os.Handler.dispatchMessage(Handler.java:111)
  at at android.os.Looper.loop(Looper.java:207)
  at at android.app.ActivityThread.main(ActivityThread.java:5728)
  at at java.lang.reflect.Method.invoke(Native Method)
  at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
  at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
  at Caused by: java.lang.reflect.InvocationTargetException
  at at java.lang.reflect.Constructor.newInstance(Native Method)
  at at android.view.LayoutInflater.createView(LayoutInflater.java:619)
  at ... 22 more
  at Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 13: TypedValue{t=0x2/d=0x7f010059 a=3}
  at at android.content.res.TypedArray.getDrawable(TypedArray.java:867)
  at at android.view.View.<init>(View.java:4001)
  at at android.view.ViewGroup.<init>(ViewGroup.java:604)
  at at android.widget.FrameLayout.<init>(FrameLayout.java:115)
  at at android.widget.FrameLayout.<init>(FrameLayout.java:110)
  at at android.widget.FrameLayout.<init>(FrameLayout.java:106)
  at ... 24 more
  --- End of inner exception stack trace ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3540/1cf254db/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
  at Java.Interop.JniEnvironment+StaticMethods.CallStaticObjectMethod (JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00082] in /Users/builder/data/lanes/3540/1cf254db/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:12649
  at Java.Interop.JniPeerMembers+JniStaticMethods.InvokeObjectMethod (System.String encodedMember, Java.Interop.JniArgumentValue* parameters) [0x0001b] in /Users/builder/data/lanes/3540/1cf254db/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniStaticMethods.cs:97
  at Android.Views.View.Inflate (Android.Content.Context context, Int32 resource, Android.Views.ViewGroup root) [0x00069] in /Users/builder/data/lanes/3540/1cf254db/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.View.cs:13446
  at BottomNavigationBar.BottomBar.UpdateItems (BottomNavigationBar.BottomBarItemBase[] bottomBarItems) [0x0016e] in <filename unknown>:0
  at BottomNavigationBar.BottomBar.SetItems (BottomNavigationBar.BottomBarTab[] bottomBarTabs) [0x0000d] in <filename unknown>:0
  at PortalsofPrayer.Droid.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x00049] in /Users/danielbergquist/src/portals/PortalsofPrayer/Droid/MainActivity.cs:36
  at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) [0x00011] in /Users/builder/data/lanes/3540/1cf254db/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.App.Activity.cs:2426
  at at (wrapper dynamic-method) System.Object:55083670-ce0a-4318-b726-d9181396715a (intptr,intptr,intptr)
  at --- End of managed Android.Views.InflateException stack trace ---
  at android.view.InflateException: Binary XML file line #1: Binary XML file line #1: Error inflating class <unknown>
  at at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
  at at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
  at at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
  at at android.view.View.inflate(View.java:20171)
  at at md58441721984586c4571cb9a14cde11b83.MainActivity.n_onCreate(Native Method)
  at at md58441721984586c4571cb9a14cde11b83.MainActivity.onCreate(MainActivity.java:30)
  at at android.app.Activity.performCreate(Activity.java:6309)
  at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)
  at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2519)
  at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)
  at at android.app.ActivityThread.-wrap11(ActivityThread.java)
  at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)
  at at android.os.Handler.dispatchMessage(Handler.java:111)
  at at android.os.Looper.loop(Looper.java:207)
  at at android.app.ActivityThread.main(ActivityThread.java:5728)
  at at java.lang.reflect.Method.invoke(Native Method)
  at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
  at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
  at Caused by: android.view.InflateException: Binary XML file line #1: Error inflating class <unknown>
  at at android.view.LayoutInflater.createView(LayoutInflater.java:645)
  at at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)
  at at android.view.LayoutInflater.onCreateView(LayoutInflater.java:694)
  at at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762)
  at at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
  at at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
  at ... 17 more
  at Caused by: java.lang.reflect.InvocationTargetException
  at at java.lang.reflect.Constructor.newInstance(Native Method)
  at at android.view.LayoutInflater.createView(LayoutInflater.java:619)
  at ... 22 more
  at Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 13: TypedValue{t=0x2/d=0x7f010059 a=3}
  at at android.content.res.TypedArray.getDrawable(TypedArray.java:867)
  at at android.view.View.<init>(View.java:4001)
  at at android.view.ViewGroup.<init>(ViewGroup.java:604)
  at at android.widget.FrameLayout.<init>(FrameLayout.java:115)
  at at android.widget.FrameLayout.<init>(FrameLayout.java:110)
  at at android.widget.FrameLayout.<init>(FrameLayout.java:106)
  at ... 24 more

Xamarin info:

Xamarin Studio Community
Version 6.0.2 (build 73)
Installation UUID: 94e8b40a-646a-4c4a-a5f0-23397344dcd2
Runtime:
Mono 4.4.2 (mono-4.4.0-branch-c7sr1/f72fe45) (64-bit)
GTK+ 2.24.23 (Raleigh theme)

  Package version: 404020011

Xamarin.Profiler
Not Installed

Apple Developer Tools
Xcode 7.3.1 (10188.1)
Build 7D1014

Xamarin.Mac
Not Installed

Xamarin.Android
Version: 6.1.2.21 (Xamarin Studio Community)
Android SDK: /Users/danielbergquist/Library/Android/sdk
Supported Android versions:
4.0.3 (API level 15)
4.1 (API level 16)
4.4 (API level 19)
5.1 (API level 22)
6.0 (API level 23)

SDK Tools Version: 25.1.7
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.3

Java SDK: /usr
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Xamarin Android Player
Not Installed

Xamarin.iOS
Version: 9.8.2.22 (Xamarin Studio Community)
Hash: f37444a
Branch: cycle7-sr1
Build date: 2016-07-28 12:17:02-0400

Build Information
Release ID: 600020073
Git revision: a6f7a24a9723a2d4f5d33c176615b0d44703ab5b
Build date: 2016-07-26 13:36:15-04
Xamarin addins: f5acb37866a0141bc5ddbe95118f18dae4014568
Build lane: monodevelop-lion-cycle7-sr1

Operating System
Mac OS X 10.11.6
Darwin Daniels-MacBook-Pro-3.local 15.6.0 Darwin Kernel Version 15.6.0
Thu Jun 23 18:25:34 PDT 2016
root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64

NuGet:

BottomNavigationBar 1.1.3

@jonathancromie
Copy link

You need to set the style to inherit from AppCompat theme. Explained here https://github.com/pocheshire/BottomNavigationBar/issues/13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants