Reputation: 577
I have a simple Nativescript app - with just 1 component display a label 'Hello World'. Works fine on the android emulator. But when I try and preview it on the IOS device, it gives me this error - Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Error: More than one layout child inside a ContentView
Not sure why? Can anybody help?
Upvotes: 1
Views: 1605
Reputation: 21908
ContentView
or it's descendants like Page
, ScrollView
etc., are designed to hold only one child component.
You must use one of the Layouts (Stack, Grid, Flex, Dock, Wrap, Absolute) if you want to hold more than one child component.
Upvotes: 2