Mapbox don't working

plugins

#1

Hello! could you help me with mapbox.
I try add map to my project (this tutorial https://www.nativescript.org/blog/include-feature-rich-maps-in-a-nativescript-vue-app-with-mapbox).

  1. Are there another maps for Vue Native?
  2. Can I solve this problem (see tutorial)?

main.js

import Vue from 'nativescript-vue';

Vue.registerElement("Mapbox", () => require("nativescript-mapbox").MapboxView)

import HelloWorld from './components/HelloWorld';


import './styles.scss';

// Uncomment the following to see NativeScript-Vue output logs
//Vue.config.silent = false;

new Vue({

  render: h => h(HelloWorld),

}).$start();

HelloWorld.vue

<template>
    <Page class="page">
        <ActionBar class="action-bar" title="Vue Mapbox Example"></ActionBar>
        <GridLayout>
                <Mapbox
                    accessToken="pk.eyJ1IjoicHJvbWlzdHJpbyIsImEiOiJjaW1wNmIzaHQwMDJ5d2FtNGNhb28zZTRsIn0.nYE56atkirjFdB5oEkpYVA"
                    mapStyle="traffic_day"
                    latitude="37.7397"
                    longitude="-121.4252"
                    hideCompass="true"
                    zoomLevel="12"
                    showUserLocation="false"
                    disableZoom="false"
                    disableRotation="false"
                    disableScroll="false"
                    disableTilt="false"
                    @mapReady="onMapReady($event)">
                </Mapbox>
        </GridLayout>
    </Page>
</template>

<script>
    export default {
        data () {
            return { };
        },
        methods: {
            onMapReady(args) {
                args.map.addMarkers([
                    {
                        lat: 37.7397,
                        lng: -121.4252,
                        title: "Tracy, CA",
                        subtitle: "Home of The Polyglot Developer!",
                        onCalloutTap: () => {
                            utils.openUrl("https://www.thepolyglotdeveloper.com");
                        }
                    }
                ]);
            }
        }
    };
</script>

<style scoped></style>

#2

Can you please paste the complete error log?


#3
An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: 

Error calling module function 

ReferenceError: Vue is not defined
File: "file:///data/data/org.nativescript.application/files/app/app.js, line: 13611, column: 0

StackTrace: 
	Frame: function:'Object.defineProperty.value', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 13611, column: 1
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 20, column: 30
	Frame: function:'module.exports', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 13411, column: 157
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 20, column: 30
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 143, column: 19
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 20, column: 30
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 63, column: 18
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 66, column: 10
	Frame: function:'require', file:'', line: 1, column: 266


ReferenceError: Vue is not defined
File: "<unknown>, line: 1, column: 265

StackTrace: 
	Frame: function:'Object.defineProperty.value', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 13611, column: 1
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 20, column: 30
	Frame: function:'module.exports', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 13411, column: 157
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 20, column: 30
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 143, column: 19
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 20, column: 30
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 63, column: 18
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 66, column: 10
	Frame: function:'require', file:'', line: 1, column: 266


	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5904)
	at android.app.ActivityThread.-wrap2(ActivityThread.java)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1704)
	at android.os.Handler.dispatchMessage(Handler.java:113)
	at android.os.Looper.loop(Looper.java:205)
	at android.app.ActivityThread.main(ActivityThread.java:6783)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1225)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1086)
Caused by: com.tns.NativeScriptException: 

Error calling module function 

ReferenceError: Vue is not defined
File: "file:///data/data/org.nativescript.application/files/app/app.js, line: 13611, column: 0

StackTrace: 
	Frame: function:'Object.defineProperty.value', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 13611, column: 1
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 20, column: 30
	Frame: function:'module.exports', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 13411, column: 157
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 20, column: 30
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 143, column: 19
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 20, column: 30
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 63, column: 18
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 66, column: 10
	Frame: function:'require', file:'', line: 1, column: 266


ReferenceError: Vue is not defined
File: "<unknown>, line: 1, column: 265

StackTrace: 
	Frame: function:'Object.defineProperty.value', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 13611, column: 1
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 20, column: 30
	Frame: function:'module.exports', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 13411, column: 157
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 20, column: 30
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 143, column: 19
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 20, column: 30
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 63, column: 18
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 66, column: 10
	Frame: function:'require', file:'', line: 1, column: 266


	at com.tns.Runtime.runModule(Native Method)
	at com.tns.Runtime.runModule(Runtime.java:542)
	at com.tns.Runtime.run(Runtime.java:534)
	at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1028)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5885)
	... 8 more

#4

It says Vue is not defined which is strange, but at least I know some people successfully using this plugin in Vue. So do you want share a sample app where this issue can be reproduced?


#5

git clone https://vladosed@bitbucket.org/vladosed/mapbox-error-vue.js.git


#6

Come on man, you haven’t imported Vue at all in your HelloWorld.vue before registering for element.

At least try to share exact sample code when posting here. You used right code here in main.js, in the example project it was different.


#7

Sorry, I do some experiments with code and forget it:). Code has been changed.
Mapbox was installed

npm install nativescript-mapbox --save

error:

An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.application/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: 
Calling js method onCreate failed

TypeError: Could not load view for: mapbox. Error: com.tns.NativeScriptException: Failed to find module: "nativescript-mapbox/mapbox.common", relative to: app/tns_modules/
    com.tns.Module.resolvePathHelper(Module.java:146)
    com.tns.Module.resolvePath(Module.java:55)
    com.tns.Runtime.callJSMethodNative(Native Method)
    com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1101)
    com.tns.Runtime.callJSMethodImpl(Runtime.java:983)
    com.tns.Runtime.callJSMethod(Runtime.java:970)
    com.tns.Runtime.callJSMethod(Runtime.java:954)
    com.tns.Runtime.callJSMethod(Runtime.java:946)
    com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:18)
    android.app.Activity.performCreate(Activity.java:6912)
    android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
    android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2824)
    android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2946)
    android.app.ActivityThread.-wrap12(ActivityThread.java)
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1634)
    android.os.Handler.dispatchMessage(Handler.java:113)
    android.os.Looper.loop(Looper.java:205)
    android.app.ActivityThread.main(ActivityThread.java:6783)
    java.lang.reflect.Method.invoke(Native Method)
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1225)
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1086)
File: "file:///data/data/org.nativescript.application/files/app/app.js, line: 2307, column: 6

StackTrace: 
	Frame: function:'getViewClass', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 5063, column: 11
	Frame: function:'ElementNode', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 5986, column: 21
	Frame: function:'createElement', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 6084, column: 12
	Frame: function:'createElement', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 6194, column: 23
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3566, column: 19
	Frame: function:'createChildren', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3669, column: 9
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3571, column: 9
	Frame: function:'createChildren', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3669, column: 9
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3571, column: 9
	Frame: function:'patch', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 4078, column: 7
	Frame: function:'Vue._update', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3129, column: 19
	Frame: function:'updateComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3257, column: 10
	Frame: function:'get', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2302, column: 25
	Frame: function:'Watcher', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2291, column: 12
	Frame: function:'mountComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3264, column: 3
	Frame: function:'mount', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 11358, column: 5
	Frame: function:'Vue.$mount', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 11386, column: 16
	Frame: function:'init', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 9826, column: 13
	Frame: function:'createComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3595, column: 9
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3543, column: 9
	Frame: function:'patch', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 4117, column: 9
	Frame: function:'Vue._update', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3129, column: 19
	Frame: function:'updateComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3257, column: 10
	Frame: function:'get', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2302, column: 25
	Frame: function:'Watcher', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2291, column: 12
	Frame: function:'mountComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3264, column: 3
	Frame: function:'create', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 11343, column: 9
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 51, column: 22
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 101, column: 16
	Frame: function:'FrameBase.navigate', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 213, column: 28
	Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 615, column: 19
	Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25


	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2871)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2946)
	at android.app.ActivityThread.-wrap12(ActivityThread.java)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1634)
	at android.os.Handler.dispatchMessage(Handler.java:113)
	at android.os.Looper.loop(Looper.java:205)
	at android.app.ActivityThread.main(ActivityThread.java:6783)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1225)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1086)
Caused by: com.tns.NativeScriptException: 
Calling js method onCreate failed

TypeError: Could not load view for: mapbox. Error: com.tns.NativeScriptException: Failed to find module: "nativescript-mapbox/mapbox.common", relative to: app/tns_modules/
    com.tns.Module.resolvePathHelper(Module.java:146)
    com.tns.Module.resolvePath(Module.java:55)
    com.tns.Runtime.callJSMethodNative(Native Method)
    com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1101)
    com.tns.Runtime.callJSMethodImpl(Runtime.java:983)
    com.tns.Runtime.callJSMethod(Runtime.java:970)
    com.tns.Runtime.callJSMethod(Runtime.java:954)
    com.tns.Runtime.callJSMethod(Runtime.java:946)
    com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:18)
    android.app.Activity.performCreate(Activity.java:6912)
    android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
    android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2824)
    android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2946)
    android.app.ActivityThread.-wrap12(ActivityThread.java)
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1634)
    android.os.Handler.dispatchMessage(Handler.java:113)
    android.os.Looper.loop(Looper.java:205)
    android.app.ActivityThread.main(ActivityThread.java:6783)
    java.lang.reflect.Method.invoke(Native Method)
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1225)
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1086)
File: "file:///data/data/org.nativescript.application/files/app/app.js, line: 2307, column: 6

StackTrace: 
	Frame: function:'getViewClass', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 5063, column: 11
	Frame: function:'ElementNode', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 5986, column: 21
	Frame: function:'createElement', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 6084, column: 12
	Frame: function:'createElement', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 6194, column: 23
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3566, column: 19
	Frame: function:'createChildren', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3669, column: 9
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3571, column: 9
	Frame: function:'createChildren', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3669, column: 9
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3571, column: 9
	Frame: function:'patch', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 4078, column: 7
	Frame: function:'Vue._update', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3129, column: 19
	Frame: function:'updateComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3257, column: 10
	Frame: function:'get', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2302, column: 25
	Frame: function:'Watcher', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2291, column: 12
	Frame: function:'mountComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3264, column: 3
	Frame: function:'mount', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 11358, column: 5
	Frame: function:'Vue.$mount', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 11386, column: 16
	Frame: function:'init', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 9826, column: 13
	Frame: function:'createComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3595, column: 9
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3543, column: 9
	Frame: function:'patch', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 4117, column: 9
	Frame: function:'Vue._update', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3129, column: 19
	Frame: function:'updateComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3257, column: 10
	Frame: function:'get', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2302, column: 25
	Frame: function:'Watcher', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2291, column: 12
	Frame: function:'mountComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3264, column: 3
	Frame: function:'create', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 11343, column: 9
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 51, column: 22
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 101, column: 16
	Frame: function:'FrameBase.navigate', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 213, column: 28
	Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 615, column: 19
	Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25


	at com.tns.Runtime.callJSMethodNative(Native Method)
	at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1101)
	at com.tns.Runtime.callJSMethodImpl(Runtime.java:983)
	at com.tns.Runtime.callJSMethod(Runtime.java:970)
	at com.tns.Runtime.callJSMethod(Runtime.java:954)
	at com.tns.Runtime.callJSMethod(Runtime.java:946)
	at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:18)
	at android.app.Activity.performCreate(Activity.java:6912)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2824)
	... 9 more

#8

I can confirm in the same sample project after importing Vue in the Helloworld.vue file, it worked - map was loaded successfully with a pin.


#9

Could you share your project?


#10

Problem like me Can't get plugins to work (MapBox, BottomNavigation)


#11

It’s same project you shared, I just imported Vue and everything worked perfectly.


#13

What do you mean “just imported Vue”. Is it adding import Vue from 'nativescript-vue'; to HelloWorld.vue? It doesn’t work:(

Could not load view for: mapbox. Error


#14

May be problem on device?


#15

Yes, exactly the same import statement.


#17

Doesn’t work :cry: I don’t know,how to solve this problem. I am a beginner of NativeScript:(
I will try to install apk on another device, but I think, that it is native script or my problem

P.S. I’m starting to love QML


#18

Could you give me your version? I have this error on the another device and computer


#19

CLI: 4.1.2
iOS Runtime: 4.1.1
Android Runtime: 4.1.3


#21

Last question. Could you give me your code? If it doesn’t work, I’ll come back to qml


#22

Come on man, how many times I should mention it’s the same project you have in Github. I just cloned ran it.

Is the error log is still same when you run it since you have added the import now?


#24

It changed

An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.application/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: 
Calling js method onCreate failed

TypeError: Could not load view for: mapbox. Error: com.tns.NativeScriptException: Failed to find module: "nativescript-mapbox/mapbox.common", relative to: app/tns_modules/
    com.tns.Module.resolvePathHelper(Module.java:146)
    com.tns.Module.resolvePath(Module.java:55)
    com.tns.Runtime.callJSMethodNative(Native Method)
    com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1101)
    com.tns.Runtime.callJSMethodImpl(Runtime.java:983)
    com.tns.Runtime.callJSMethod(Runtime.java:970)
    com.tns.Runtime.callJSMethod(Runtime.java:954)
    com.tns.Runtime.callJSMethod(Runtime.java:946)
    com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:18)
    android.app.Activity.performCreate(Activity.java:6912)
    android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
    android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2824)
    android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2946)
    android.app.ActivityThread.-wrap12(ActivityThread.java)
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1634)
    android.os.Handler.dispatchMessage(Handler.java:113)
    android.os.Looper.loop(Looper.java:205)
    android.app.ActivityThread.main(ActivityThread.java:6783)
    java.lang.reflect.Method.invoke(Native Method)
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1225)
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1086)
File: "file:///data/data/org.nativescript.application/files/app/app.js, line: 2307, column: 6

StackTrace: 
	Frame: function:'getViewClass', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 5063, column: 11
	Frame: function:'ElementNode', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 5986, column: 21
	Frame: function:'createElement', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 6084, column: 12
	Frame: function:'createElement', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 6194, column: 23
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3566, column: 19
	Frame: function:'createChildren', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3669, column: 9
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3571, column: 9
	Frame: function:'createChildren', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3669, column: 9
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3571, column: 9
	Frame: function:'patch', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 4078, column: 7
	Frame: function:'Vue._update', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3129, column: 19
	Frame: function:'updateComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3257, column: 10
	Frame: function:'get', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2302, column: 25
	Frame: function:'Watcher', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2291, column: 12
	Frame: function:'mountComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3264, column: 3
	Frame: function:'mount', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 11358, column: 5
	Frame: function:'Vue.$mount', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 11386, column: 16
	Frame: function:'init', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 9826, column: 13
	Frame: function:'createComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3595, column: 9
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3543, column: 9
	Frame: function:'patch', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 4117, column: 9
	Frame: function:'Vue._update', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3129, column: 19
	Frame: function:'updateComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3257, column: 10
	Frame: function:'get', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2302, column: 25
	Frame: function:'Watcher', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2291, column: 12
	Frame: function:'mountComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3264, column: 3
	Frame: function:'create', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 11343, column: 9
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 51, column: 22
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 101, column: 16
	Frame: function:'FrameBase.navigate', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 213, column: 28
	Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 615, column: 19
	Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25


	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2871)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2946)
	at android.app.ActivityThread.-wrap12(ActivityThread.java)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1634)
	at android.os.Handler.dispatchMessage(Handler.java:113)
	at android.os.Looper.loop(Looper.java:205)
	at android.app.ActivityThread.main(ActivityThread.java:6783)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1225)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1086)
Caused by: com.tns.NativeScriptException: 
Calling js method onCreate failed

TypeError: Could not load view for: mapbox. Error: com.tns.NativeScriptException: Failed to find module: "nativescript-mapbox/mapbox.common", relative to: app/tns_modules/
    com.tns.Module.resolvePathHelper(Module.java:146)
    com.tns.Module.resolvePath(Module.java:55)
    com.tns.Runtime.callJSMethodNative(Native Method)
    com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1101)
    com.tns.Runtime.callJSMethodImpl(Runtime.java:983)
    com.tns.Runtime.callJSMethod(Runtime.java:970)
    com.tns.Runtime.callJSMethod(Runtime.java:954)
    com.tns.Runtime.callJSMethod(Runtime.java:946)
    com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:18)
    android.app.Activity.performCreate(Activity.java:6912)
    android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
    android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2824)
    android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2946)
    android.app.ActivityThread.-wrap12(ActivityThread.java)
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1634)
    android.os.Handler.dispatchMessage(Handler.java:113)
    android.os.Looper.loop(Looper.java:205)
    android.app.ActivityThread.main(ActivityThread.java:6783)
    java.lang.reflect.Method.invoke(Native Method)
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1225)
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1086)
File: "file:///data/data/org.nativescript.application/files/app/app.js, line: 2307, column: 6

StackTrace: 
	Frame: function:'getViewClass', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 5063, column: 11
	Frame: function:'ElementNode', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 5986, column: 21
	Frame: function:'createElement', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 6084, column: 12
	Frame: function:'createElement', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 6194, column: 23
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3566, column: 19
	Frame: function:'createChildren', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3669, column: 9
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3571, column: 9
	Frame: function:'createChildren', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3669, column: 9
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3571, column: 9
	Frame: function:'patch', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 4078, column: 7
	Frame: function:'Vue._update', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3129, column: 19
	Frame: function:'updateComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3257, column: 10
	Frame: function:'get', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2302, column: 25
	Frame: function:'Watcher', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2291, column: 12
	Frame: function:'mountComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3264, column: 3
	Frame: function:'mount', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 11358, column: 5
	Frame: function:'Vue.$mount', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 11386, column: 16
	Frame: function:'init', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 9826, column: 13
	Frame: function:'createComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3595, column: 9
	Frame: function:'createElm', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3543, column: 9
	Frame: function:'patch', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 4117, column: 9
	Frame: function:'Vue._update', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3129, column: 19
	Frame: function:'updateComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3257, column: 10
	Frame: function:'get', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2302, column: 25
	Frame: function:'Watcher', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 2291, column: 12
	Frame: function:'mountComponent', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 3264, column: 3
	Frame: function:'create', file:'file:///data/data/org.nativescript.application/files/app/app.js', line: 11343, column: 9
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 51, column: 22
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 101, column: 16
	Frame: function:'FrameBase.navigate', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 213, column: 28
	Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 615, column: 19
	Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.application/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25