在iOS上运行应用程序时出错

时间:2017-01-16 20:21:14

标签: nativescript

我现在正在使用MacOS平台,并为{N}完整安装了这些工具。

我可以构建我的应用。我看到它正在模拟器上安装,也可以看到启动画面然后崩溃。

** BUILD SUCCEEDED **

Project successfully built
Successfully deployed on device with identifier '7E5B1A70-9579-4510-8279-E43522B8537C'.
1   0x107ee05dc -[TNSRuntime executeModule:referredBy:]
2   0x107a0f4e2 main
Jan 16 15:09:50 macs-iMac test4[2821]: 3   0x10d72a68d start
4   0x1
[native code]: JS ERROR NSErrorWrapper: The data couldn’t be read because it isn’t in the correct format.
Jan 16 15:09:50 macs-iMac com.apple.CoreSimulator.SimDevice.7E5B1A70-9579-4510-8279-E43522B8537C.launchd_sim[2436] (UIKitApplication:org.nativescript.test4[0x3494][2821]): Service exited due to Segmentation fault: 11

任何帮助???

该应用在Android上正常运行。

我还在macOS上下载杂货应用程序并构建并运行正常 - 只是想确保工具安装正确。

我看到罪魁祸首是JS ERROR NSErrorWrapper: The data couldn’t be read because it isn’t in the correct format.

我怎样才能找出那可能是什么???

{
    "description": "NativeScript Application",
    "license": "SEE LICENSE IN <your-license-filename>",
    "readme": "NativeScript Application",
    "repository": "<fill-your-repository-here>",
    "nativescript": {
    "id": "org.nativescript.test4",
    "tns-ios": {
      "version": "2.4.0"
    }
  },
  "dependencies": {
    "nativescript-calendar": "^1.2.0",
    "nativescript-email": "^1.3.4",
    "nativescript-imagepicker": "^2.4.1",
    "nativescript-phone": "^1.2.3",
    "nativescript-purchase": "^1.0.1",
    "nativescript-telerik-ui": "^1.5.1",
    "nativescript-theme-core": "^0.2.5",
    "nativescript-themes": "^1.1.0",
    "nativescript-toast": "^1.4.3",
    "tns-core-modules": "^2.4.4"
  },
  "devDependencies": {
    "babel-traverse": "6.19.0",
    "babel-types": "6.19.0",
    "babylon": "6.14.1",
    "lazy": "1.0.11",
    "nativescript-dev-android-snapshot": "^0.*.*",
    "nativescript-dev-typescript": "^0.3.0",
    "nativescript-dev-sass": "^0.4.1",
    "typescript": "^1.8.10"
  }
}

1 个答案:

答案 0 :(得分:0)

好的发现了问题。

<Page.actionBar>
    <ActionBar class="action-bar">
        <android>
            <GridLayout rows="auto" columns="auto,*,auto,auto">
                <Label row="0" col="0" text="test"></Label>
            </GridLayout>
        </android>
        <ios>
        </ios>
    </ActionBar>
</Page.actionBar>

我没有为iOS动作栏定义一些东西 - 这导致了分段错误。

是的,我计划在进入Mac平台后添加它。

一条简单的错误信息本来不错。