Nativescript-bottomnavigation crashing the app


#1

I am new to nativescript and I am trying to use the nativescript-bottomnavigation followed the instruction to setup the plugin but on navigating to a page with the markup to render the control the Android App crashes.

Find the markup below

<Page
    xmlns:bottomnav="nativescript-bottomnavigation">

<bottomnav:BottomNavigation tabSelected="tabSelected">
  <bottomnav:BottomNavigation.items>
    <bottomnav:BottomNavigationItem title="Cake" color="#4CAF50" />
    <bottomnav:BottomNavigationItem title="Favorites"  color="#2196F3" />
    <bottomnav:BottomNavigationItem title="Settings"  color="#FF4081" />
  </bottomnav:BottomNavigation.items>
</bottomnav:BottomNavigation>


</Page>

This is the error that is returned


W/System.err( 2038):     com.tns.Runtime.callJSMethodNative(Native Method)
W/System.err( 2038):     com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1021)
W/System.err( 2038):     com.tns.Runtime.callJSMethodImpl(Runtime.java:903)
W/System.err( 2038):     com.tns.Runtime.callJSMethod(Runtime.java:890)
W/System.err( 2038):     com.tns.Runtime.callJSMethod(Runtime.java:874)
W/System.err( 2038):     com.tns.Runtime.callJSMethod(Runtime.java:866)
W/System.err( 2038):    at com.tns.Runtime.callJSMethodNative(Native Method)
W/System.err( 2038):    at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1021)
W/System.err( 2038):    at com.tns.Runtime.callJSMethodImpl(Runtime.java:903)
W/System.err( 2038):    at com.tns.Runtime.callJSMethod(Runtime.java:890)
W/System.err( 2038):    at com.tns.Runtime.callJSMethod(Runtime.java:874)
W/System.err( 2038):    at com.tns.Runtime.callJSMethod(Runtime.java:866)

Any help would be appreciated.


#2

Hmmm, says it’s for v2.4, wonder if it’s a v3 compatibility issue, what version of NativeScript are you on?


#3

Yea, I am running tns version 3.0.3, could that be the issue??


#4

you can use this https://github.com/henrychavez/nativescript-bottom-navigation