无法在 iOS 上 运行 应用程序 Nativescript 但在 android 上 运行s
Cant run app Nativescript on iOS but runs on android
无法在 iOS 上使用 运行 应用程序 Nativescript,但在 android 上无法使用 运行s
我的代码工作正常 android 没有问题,但在 iOS 中我得到了下面的那些错误。
我不知道为什么,我缺少什么????它是一个插件?模块?
任何帮助都会很好,因为我在这里迷路了。谢谢
当我 运行 tns run ios --env.aot --env.uglify
.
我在 运行 应用程序时遇到的错误 :
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1 0x10fe3991f NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2 0x10fe71b60 NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
3 0x110812dd6 ffi_closure_unix64_inner
4 0x1108137fa ffi_closure_unix64
5 0x114515d22 -[CALayer layoutSublayers]
6 0x11451a9fc CA::Layer::layout_if_needed(CA::Transaction*)
7 0x114526d58 CA::Layer::layout_and_display_if_needed(CA::Transaction*)
8 0x11449624a CA::Context::commit_transaction(CA::Transaction*)
9 0x1144cd606 CA::Transaction::commit()
10 0x116f942c3 __34-[UIApplication _firstCommitBlock]_block_invoke_2
11 0x115a97cbc __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__
12 0x115a97480 __CFRunLoopDoBlocks
13 0x115a91d04 __CFRunLoopRun
14 0x115a914d2 CFRunLoopRunSpecific
15 0x11b8af2fe GSEventRunModal
16 0x116f7afc2 UIApplicationMain
17 0x11081363d ffi_call_unix64
18 0x12db4cf70
JavaScript stack trace:
1 @file:///node_modules/tns-core-modules/ui/content-view/content-view.js:44:0
2 _eachLayoutView@file:///node_modules/tns-core-modules/ui/core/view/view-common.js:1015:0
3 @file:///node_modules/tns-core-modules/ui/proxy-view-container/proxy-view-container.js:45:0
4 eachChildView@file:///node_modules/tns-core-modules/ui/layouts/layout-base-common.js:125:0
5 _eachLayoutView@file:///node_modules/tns-core-modules/ui/proxy-view-container/proxy-view-container.js:43:0
6 get@file:///node_modules/tns-core-modules/ui/content-view/content-view.js:38:0
7 onMeasure@file:///node_modules/tns-core-modules/ui/page/page.js:272:0
8 measure@file:///node_modules/tns-core-modules/ui/core/view/view.js:55:0
9 measureChild@file:///node_modules/tns-core-modules/ui/core/view/view-common.js:954:0
10 i@file:///node_modules/tns-core-modules/ui/core/view/view.js:636:0
11 viewDidLayoutSubviews@file:///node_modules/tns-core-modules/ui/page/page.js:192:0
12 UIApplicationMain@[native code]
13 S@file:///node_modules/tns-core-modules/application/application.js:277:0
14 run@file:///node_modules/tns-core-modules/application/application.js:305:0
15 bootstrapNativeScriptApp@file:///node_modules/nativescript-angular/platform-common.js:205:0
16 bootstrapApp@file:///node_modules/nativescript-angular/platform-common.js:106:0
17 bootstrapModuleFactory@file:///node_modules/nativescript-angular/platform-common.js:77:0
18 @file:///app/bundle.js:72:449
19 ./main.ts@file:///app/bundle.js:72:477
20 k@file:///src/webpack/bootstrap:750:0
21 n@file:///src/webpack/bootstrap:43:0
22 r@file:///src/webpack/bootstrap:30:0
23 anonymous@file:///src/$_lazy_route_resource lazy namespace object:2:0
24 evaluate@[nat<…>
JavaScript error:
file:///node_modules/tns-core-modules/ui/content-view/content-view.js:44:0 JS ERROR Error: More than one layout child inside a
1 UIApplicationMain@[native code]
2 S@file:///node_modules/tns-core-modules/application/application.js:277:0
3 run@file:///node_modules/tns-core-modules/application/application.js:305:0
4 bootstrapNativeScriptApp@file:///node_modules/nativescript-angular/platform-common.js:205:0
5 bootstrapApp@file:///node_modules/nativescript-angular/platform-common.js:106:0
6 bootstrapModuleFactory@file:///node_modules/nativescript-angular/platform-common.js:77:0
7 @file:///app/bundle.js:72:449
8 ./main.ts@file:///app/bundle.js:72:477
9 k@file:///src/webpack/bootstrap:750:0
10 n@file:///src/webpack/bootstrap:43:0
11 r@file:///src/webpack/bootstrap:30:0
12 anonymous@file:///src/$_lazy_route_resource lazy namespace object:2:0
13 evaluate@[native code]
14 moduleEvaluation@:1:11
15 promiseReactionJob@:1:11
在您的源代码中的某处,通常在特定组件 html/xml 的根目录下,您有一个仅在 iOS 上呈现的视图。但是,因为它在 iOS 而不是 Android 上失败,很可能您没有在其他顶级元素上放置类似的限制。
<ios>
<Label text="only iOS"></Label>
</ios>
<Label text="only Android"></Label> <!-- Error; is present in template for both!! -->
我很难猜出问题到底出在哪里,但我建议您查看您的模板以了解 ios
.
的用法
好吧,在 ios 中,你不能让免费模板随处浮动,一切都在 LayoutContainer 中
Android(有效)iOS(无效)
<GridLayout>
(... Content)
</GridLayout>
<GridLayout>
(... More Content)
</GridLayout>
Android(作品)iOS(作品)
<GridLayout> // MAIN CHILD
(... Content)
<GridLayout>
(... More Content)
</GridLayout>
</GridLayout>
无法在 iOS 上使用 运行 应用程序 Nativescript,但在 android 上无法使用 运行s
我的代码工作正常 android 没有问题,但在 iOS 中我得到了下面的那些错误。
我不知道为什么,我缺少什么????它是一个插件?模块?
任何帮助都会很好,因为我在这里迷路了。谢谢
当我 运行 tns run ios --env.aot --env.uglify
.
我在 运行 应用程序时遇到的错误 :
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1 0x10fe3991f NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2 0x10fe71b60 NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
3 0x110812dd6 ffi_closure_unix64_inner
4 0x1108137fa ffi_closure_unix64
5 0x114515d22 -[CALayer layoutSublayers]
6 0x11451a9fc CA::Layer::layout_if_needed(CA::Transaction*)
7 0x114526d58 CA::Layer::layout_and_display_if_needed(CA::Transaction*)
8 0x11449624a CA::Context::commit_transaction(CA::Transaction*)
9 0x1144cd606 CA::Transaction::commit()
10 0x116f942c3 __34-[UIApplication _firstCommitBlock]_block_invoke_2
11 0x115a97cbc __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__
12 0x115a97480 __CFRunLoopDoBlocks
13 0x115a91d04 __CFRunLoopRun
14 0x115a914d2 CFRunLoopRunSpecific
15 0x11b8af2fe GSEventRunModal
16 0x116f7afc2 UIApplicationMain
17 0x11081363d ffi_call_unix64
18 0x12db4cf70
JavaScript stack trace:
1 @file:///node_modules/tns-core-modules/ui/content-view/content-view.js:44:0
2 _eachLayoutView@file:///node_modules/tns-core-modules/ui/core/view/view-common.js:1015:0
3 @file:///node_modules/tns-core-modules/ui/proxy-view-container/proxy-view-container.js:45:0
4 eachChildView@file:///node_modules/tns-core-modules/ui/layouts/layout-base-common.js:125:0
5 _eachLayoutView@file:///node_modules/tns-core-modules/ui/proxy-view-container/proxy-view-container.js:43:0
6 get@file:///node_modules/tns-core-modules/ui/content-view/content-view.js:38:0
7 onMeasure@file:///node_modules/tns-core-modules/ui/page/page.js:272:0
8 measure@file:///node_modules/tns-core-modules/ui/core/view/view.js:55:0
9 measureChild@file:///node_modules/tns-core-modules/ui/core/view/view-common.js:954:0
10 i@file:///node_modules/tns-core-modules/ui/core/view/view.js:636:0
11 viewDidLayoutSubviews@file:///node_modules/tns-core-modules/ui/page/page.js:192:0
12 UIApplicationMain@[native code]
13 S@file:///node_modules/tns-core-modules/application/application.js:277:0
14 run@file:///node_modules/tns-core-modules/application/application.js:305:0
15 bootstrapNativeScriptApp@file:///node_modules/nativescript-angular/platform-common.js:205:0
16 bootstrapApp@file:///node_modules/nativescript-angular/platform-common.js:106:0
17 bootstrapModuleFactory@file:///node_modules/nativescript-angular/platform-common.js:77:0
18 @file:///app/bundle.js:72:449
19 ./main.ts@file:///app/bundle.js:72:477
20 k@file:///src/webpack/bootstrap:750:0
21 n@file:///src/webpack/bootstrap:43:0
22 r@file:///src/webpack/bootstrap:30:0
23 anonymous@file:///src/$_lazy_route_resource lazy namespace object:2:0
24 evaluate@[nat<…>
JavaScript error:
file:///node_modules/tns-core-modules/ui/content-view/content-view.js:44:0 JS ERROR Error: More than one layout child inside a
1 UIApplicationMain@[native code]
2 S@file:///node_modules/tns-core-modules/application/application.js:277:0
3 run@file:///node_modules/tns-core-modules/application/application.js:305:0
4 bootstrapNativeScriptApp@file:///node_modules/nativescript-angular/platform-common.js:205:0
5 bootstrapApp@file:///node_modules/nativescript-angular/platform-common.js:106:0
6 bootstrapModuleFactory@file:///node_modules/nativescript-angular/platform-common.js:77:0
7 @file:///app/bundle.js:72:449
8 ./main.ts@file:///app/bundle.js:72:477
9 k@file:///src/webpack/bootstrap:750:0
10 n@file:///src/webpack/bootstrap:43:0
11 r@file:///src/webpack/bootstrap:30:0
12 anonymous@file:///src/$_lazy_route_resource lazy namespace object:2:0
13 evaluate@[native code]
14 moduleEvaluation@:1:11
15 promiseReactionJob@:1:11
在您的源代码中的某处,通常在特定组件 html/xml 的根目录下,您有一个仅在 iOS 上呈现的视图。但是,因为它在 iOS 而不是 Android 上失败,很可能您没有在其他顶级元素上放置类似的限制。
<ios>
<Label text="only iOS"></Label>
</ios>
<Label text="only Android"></Label> <!-- Error; is present in template for both!! -->
我很难猜出问题到底出在哪里,但我建议您查看您的模板以了解 ios
.
好吧,在 ios 中,你不能让免费模板随处浮动,一切都在 LayoutContainer 中
Android(有效)iOS(无效)
<GridLayout>
(... Content)
</GridLayout>
<GridLayout>
(... More Content)
</GridLayout>
Android(作品)iOS(作品)
<GridLayout> // MAIN CHILD
(... Content)
<GridLayout>
(... More Content)
</GridLayout>
</GridLayout>