当我使用$ kubeadm version --output json
{
"clientVersion": {
"major": "1",
"minor": "12",
"gitVersion": "v1.12.2",
"gitCommit": "17c77c7898218073f14c8d573582e8d2313dc740",
"gitTreeState": "clean",
"buildDate": "2018-10-24T06:51:33Z",
"goVersion": "go1.10.4",
"compiler": "gc",
"platform": "linux/amd64"
}
}
运行时,我的应用程序运行良好,但是当我使用tns run android
时,它给了我异常。以下是堆栈跟踪:
tns run android --bundle
以下是我的package.json
System.err: com.tns.NativeScriptException:
System.err: Calling js method onViewAttachedToWindow failed
System.err: TypeError: Cannot read property 'onNavigatingTo' of undefined
System.err: File: "file:///data/data/com.travel/files/app/vendor.js, line: 32768, column: 36
System.err: StackTrace:
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase._onNavigatingTo', file:'file:///data/data/co
m.travel/files/app/vendor.js', line: 32768, column: 37
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase.performNavigation', file:'file:///data/data/
com.travel/files/app/vendor.js', line: 32740, column: 14
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase._processNextNavigationEntry', file:'file:///
data/data/com.travel/files/app/vendor.js', line: 32733, column: 22
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame.js.Frame._processNextNavigationEntry', file:'file:///data/data/c
om.travel/files/app/vendor.js', line: 33206, column: 58
System.err: Frame: function:'push.../node_modules/tns-core-modules/ui/frame/frame.js.Frame._onAttachedToWindow', file:'file:///data/data/com.trav
el/files/app/vendor.js', line: 33181, column: 14
System.err: Frame: function:'AttachListener.onViewAttachedToWindow', file:'file:///data/data/com.travel/files/app/vendor.js', line: 33
098, column: 27
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
有人可以指导我这里怎么了吗?完整的源代码可以在https://github.com/rakeshgirase/NSWebpack
中找到答案 0 :(得分:0)
Nativescript Webpack静态分析所有需要加载的组件并简化此过程,这就是每个页面都必须以“ page”结尾的原因。可以在https://github.com/NativeScript/nativescript-dev-webpack/issues/775上找到更多详细信息。