简体   繁体   English

Nativescript + Vue:同步仅在设备和模拟器上都首次生效

[英]Nativescript + Vue: sync only works the first time on both device and emulator

Project Nativescript + Vue Project Nativescript + Vue

NativeScript CLI version: 5.4.2 NativeScript CLI版本:5.4.2

package.json package.json

  "dependencies": {
    "axios": "0.19.0",
    "jwt-decode": "2.2.0",
    "moment": "^2.24.0",
    "nativescript-iqkeyboardmanager": "^1.5.1",
    "nativescript-pulltorefresh": "2.3.0",
    "nativescript-theme-core": "~1.0.6",
    "nativescript-ui-listview": "6.4.2",
    "nativescript-vue": "~2.2.2",
    "nativescript-vue-navigator": "0.0.3",
    "tns-core-modules": "~5.4.3",
    "vuex": "3.1.1"
  },
  "devDependencies": {
    "@babel/core": "~7.4.5",
    "@babel/preset-env": "~7.4.5",
    "babel-loader": "~8.0.6",
    "nativescript-dev-webpack": "^0.24.1",
    "nativescript-vue-template-compiler": "~2.2.2",
    "node-sass": "^4.12.0",
    "vue-loader": "^15.7.1"
  },

When I build and run "tns run" or "tns debug" or use "Run on device" on Sidekick, the syncronization on both device and emulator only works the first time. 当我在Sidekick上构建并运行“ tns run”或“ tns debug”或使用“在设备上运行”时,设备和仿真器上的同步仅在第一次工作。 From the second time I get blank screen or get the error: 从第二次起,我出现黑屏或出现错误:

Calling js method onCreateView failed 调用js方法onCreateView失败

Error: View already has a parent. 错误:视图已经有一个父级。 View: Page(23) Parent: TabViewItem(22) 视图:页面(23)父级:TabViewItem(22)

I've already tried to disable Hot Module Replacement but the problem continue. 我已经尝试禁用热模块更换,但是问题仍然存在。 The only solution is to uninstall the app and rerun the local build. 唯一的解决方案是卸载应用程序并重新运行本地版本。

The problem occours on both local and cloud build. 该问题同时发生在本地和云构建上。

Any idea? 任何想法? Thanks 谢谢

实际上,我使用NS6重构了我的应用程序,现在它运行良好!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 仅在 Android 上,React Native 天才聊天在模拟器和设备上崩溃,在 iOS 中工作正常 - React Native gifted chat crashing on both emulator and device only on Android, works fine in iOS 单击应用程序小部件在模拟器上工作但在真实设备上首次工作然后 onclick 永远不会响应 - App widget on click working on emulator but on real device works for the first time then onclick is never responded Android小部件仅在模拟器上有效,而不能在真实设备上有效 - Android widget works only on emulator not on real device 我的应用程序只能在模拟器上运行,而不能在真实设备上运行 - My app works only on emulator, not on the real device 设备和模拟器上的内存不足 - OutOfMemory on both device and emulator 通知仅适用于第一次 - Notification works only for first time Orientationchange只能在第一次使用 - Orientationchange only works the first time 切换仅在第一次时有效 - Toggle only works the first time HttpURLConnection在模拟器上有效,但在设备上无效 - HttpURLConnection works on emulator but not on the device 应用程序适用于模拟器但不适用于设备? - App works on emulator but not on device?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM