Getting error when trying background color from an array

android

#1

I am using vue-cli to make a nativescript app.when i trying to take backgroundColor value from data array it showing error But it is working for color.

My Json data :

{
“name”: “rhymes”,
“version”: “1.0.0”,
“description”: “children rhymes using nativescript-vue”,
“author”: “darahat darahat42@gmail.com”,
“license”: “MIT”,
“scripts”: {
“build”: “webpack --env.tnsAction build”,
“build:android”: “npm run build – --env.android”,
“build:ios”: “npm run build – --env.ios”,
“debug”: “webpack --watch --env.tnsAction debug”,
“debug:android”: “npm run debug – --env.android”,
“debug:ios”: “npm run debug – --env.ios”,
“watch”: “webpack --watch --env.tnsAction run”,
“watch:android”: “npm run watch – --env.android”,
“watch:ios”: “npm run watch – --env.ios”,
“clean”: “rimraf dist”
},
“dependencies”: {
“nativescript-fonticon”: “^1.1.1”,
“nativescript-theme-core”: “^1.0.4”,
“nativescript-ui-sidedrawer”: “^4.1.0”,
“nativescript-vue”: “^1.3.1”,
“tns-core-modules”: “~3.4.1”,
“vue-router”: “^3.0.1”,
“vuex”: “^3.0.1”
},
“devDependencies”: {
“babel-core”: “^6.26.0”,
“babel-loader”: “^7.1.4”,
“babel-plugin-transform-object-rest-spread”: “^6.26.0”,
“babel-preset-env”: “^1.6.1”,
“copy-webpack-plugin”: “^4.5.1”,
“css-loader”: “^0.28.11”,
“extract-text-webpack-plugin”: “^3.0.2”,
“fs-extra”: “^5.0.0”,
“nativescript-vue-externals”: “^0.2.0”,
“nativescript-vue-loader”: “^0.1.5”,
“nativescript-vue-target”: “^0.1.0”,
“nativescript-vue-template-compiler”: “^1.3.1”,
“node-sass”: “^4.7.2”,
“ns-vue-loader”: “^0.1.2”,
“optimize-css-assets-webpack-plugin”: “^3.2.0”,
“rimraf”: “^2.6.2”,
“sass-loader”: “^6.0.7”,
“vue-template-compiler”: “^2.5.16”,
“webpack”: “^3.11.0”,
“webpack-synchronizable-shell-plugin”: “0.0.7”,
“winston-color”: “^1.0.0”
}
}

My UI Code:

    <ListView  for="item in catagory" @itemTap="onItemTap()" class="fontawesome2 sideStackLayout">
      <v-template>
        <Label :text="item.title" :backgroundColor="item.backgroundColor" class="sideLabel sideLightGrayLabel fontawesome2" padding="10"></Label>
      </v-template>
    </ListView>

My Vuejs code:

export default {
data(){
return{
catagory:[{

      icon:'\uf015',
      title:'Home',
      backgroundColor:'red',
    }]
  }
},

Errors :

ActivityManager: Start proc 17745:org.darahat42.Rhymes/u0a140 for activity org.darahat42.Rhymes/com.tns.NativeScriptActivity
JS: ‘Collections to load: fa,ion’
JS: ‘----------’
JS: ‘Loading collection ‘fa’ from file: ./font-awesome.css’
JS: ‘NativeScript-Vue has “Vue.config.silent” set to true, to see output logs set it to false.’
JS: ‘----------’
JS: ‘Loading collection ‘ion’ from file: ./ionicons.css’
System.err: com.tns.NativeScriptException:
System.err: Calling js method getView failed
System.err:
System.err: Error: Cannot convert object to I at index 13
System.err: File: "file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/styling/background.js, line: 121, column: 23
System.err:
System.err: StackTrace:
System.err: Frame: function:‘refreshBorderDrawable’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/styling/background.js’, line: 121, column: 24
System.err: Frame: function:‘onBackgroundOrBorderPropertyChanged’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/styling/background.js’, line: 54, column: 17
System.err: Frame: function:‘View._redrawNativeBackground’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/view/view.js’, line: 425, column: 29
System.err: Frame: function:‘View.(anonymous function)’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/view/view.js’, line: 405, column: 14
System.err: Frame: function:‘applyAllNativeSetters’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/properties/properties.js’, line: 978, column: 37
System.err: Frame: function:‘initNativeView’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/properties/properties.js’, line: 905, column: 9
System.err: Frame: function:‘ViewBase.onResumeNativeUpdates’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/view-base/view-base.js’, line: 555, column: 22
System.err: Frame: function:‘ViewBase._resumeNativeUpdates’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/view-base/view-base.js’, line: 223, column: 18
System.err: Frame: function:‘ViewBase.onLoaded’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/view-base/view-base.js’, line: 200, column: 14
System.err: Frame: function:‘View.onLoaded’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/view/view.js’, line: 62, column: 35
System.err: Frame: function:’’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/view-base/view-base.js’, line: 206, column: 19
System.err: Frame: function:‘LayoutBaseCommon.eachChildView’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js’, line: 125, column: 26
System.err: Frame: function:‘ViewCommon.eachChild’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/view/view-common.js’, line: 699, column: 14
System.err: Frame: function:‘ViewBase._loadEachChild’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/view-base/view-base.js’, line: 205, column: 14
System.err: Frame: function:‘ViewBase.onLoaded’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/view-base/view-base.js’, line: 201, column: 14
System.err: Frame: function:‘View.onLoaded’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/view/view.js’, line: 62, column: 35
System.err: Frame: function:‘ViewBase._addViewCore’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/view-base/view-base.js’, line: 360, column: 18
System.err: Frame: function:‘ViewBase._addView’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/core/view-base/view-base.js’, line: 346, column: 14
System.err: Frame: function:‘ListViewAdapter.getView’, file:‘file:///data/data/org.darahat42.Rhymes/files/app/tns_modules/tns-core-modules/ui/list-view/list-view.js’, line: 263, column: 36
System.err:
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1088)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:970)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:957)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:941)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:933)
System.err: at com.tns.gen.android.widget.BaseAdapter_view_185_32_ListViewAdapter.getView(BaseAdapter_view_185_32_ListViewAdapter.java:47)
System.err: at android.widget.AbsListView.obtainView(AbsListView.java:2491)
System.err: at android.widget.ListView.measureHeightOfChildren(ListView.java:1349)
System.err: at android.widget.ListView.onMeasure(ListView.java:1250)
System.err: at android.view.View.measure(View.java:20084)
System.err: at org.nativescript.widgets.CommonLayoutParams.measureChild(CommonLayoutParams.java:262)
System.err: at org.nativescript.widgets.StackLayout.onMeasure(StackLayout.java:83)
System.err: at android.view.View.measure(View.java:20084)
System.err: at org.nativescript.widgets.CommonLayoutParams.measureChild(CommonLayoutParams.java:262)
System.err: at org.nativescript.widgets.StackLayout.onMeasure(StackLayout.java:83)
System.err: at android.view.View.measure(View.java:20084)
System.err: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6282)
System.err: at android.widget.FrameLayout.onMeasure(FrameLayout.java:214)
System.err: at android.view.View.measure(View.java:20084)
System.err: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6282)
System.err: at android.widget.FrameLayout.onMeasure(FrameLayout.java:214)
System.err: at android.view.View.measure(View.java:20084)
System.err: at org.nativescript.widgets.CommonLayoutParams.measureChild(CommonLayoutParams.java:262)
System.err: at org.nativescript.widgets.MeasureHelper.measureChildFixedColumnsAndRows(GridLayout.java:1055)
System.err: at org.nativescript.widgets.MeasureHelper.measure(GridLayout.java:865)
System.err: at org.nativescript.widgets.GridLayout.onMeasure(GridLayout.java:279)
System.err: at android.view.View.measure(View.java:20084)
System.err: at org.nativescript.widgets.CommonLayoutParams.measureChild(CommonLayoutParams.java:262)
System.err: at org.nativescript.widgets.MeasureHelper.measureChildFixedColumnsAndRows(GridLayout.java:1055)
System.err: at org.nativescript.widgets.MeasureHelper.measure(GridLayout.java:865)
System.err: at org.nativescript.widgets.GridLayout.onMeasure(GridLayout.java:279)
System.err: at android.view.View.measure(View.java:20084)
System.err: at org.nativescript.widgets.CommonLayoutParams.measureChild(CommonLayoutParams.java:262)
System.err: at org.nativescript.widgets.ContentLayout.onMeasure(ContentLayout.java:32)
System.err: at android.view.View.measure(View.java:20084)
System.err: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6282)
System.err: at android.widget.FrameLayout.onMeasure(FrameLayout.java:214)
System.err: at android.view.View.measure(View.java:20084)
System.err: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6282)
System.err: at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1705)
System.err: at android.widget.LinearLayout.measureVertical(LinearLayout.java:797)
System.err: at android.widget.LinearLayout.onMeasure(LinearLayout.java:657)
System.err: at android.view.View.measure(View.java:20084)
System.err: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6282)
System.err: at android.widget.FrameLayout.onMeasure(FrameLayout.java:214)
System.err: at com.android.internal.policy.DecorView.onMeasure(DecorView.java:714)
System.err: at android.view.View.measure(View.java:20084)
System.err: at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2640)
System.err: at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1577)
System.err: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1846)
System.err: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1462)
System.err: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6965)
System.err: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:907)
System.err: at android.view.Choreographer.doCallbacks(Choreographer.java:709)
System.err: at android.view.Choreographer.doFrame(Choreographer.java:644)
System.err: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:893)
System.err: at android.os.Handler.handleCallback(Handler.java:836)
System.err: at android.os.Handler.dispatchMessage(Handler.java:103)
System.err: at android.os.Looper.loop(Looper.java:203)
System.err: at android.app.ActivityThread.main(ActivityThread.java:6251)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
ActivityManager: Process org.darahat42.Rhymes (pid 17745) has died
ActivityManager: handleAppDiedLocked: app = ProcessRecord{9bfbe47 17745:org.darahat42.Rhymes/u0a140}, app.pid = 17745
ActivityManager: cleanUpApplicationRecord – 17745