nativescript-angular: [Angular 10] RadListView (rc) causing App crash
To reproduce 1.Start a new project by nsc create sampleapp --template @nativescript/template-hello-world-ng@rc 2. tns plugin add nativescript-ui-listview@rc 3. add a RadListView to ItemsComponent as
<ActionBar title="My App">
</ActionBar>
<GridLayout>
<RadListView [items]="items">
<ng-template tkListItemTemplate let-item="item">
<StackLayout orientation="vertical">
<Label class="nameLabel" text="name"></Label>
</StackLayout>
</ng-template>
</RadListView>
</GridLayout>
- add NativeScriptUIListViewModule to app.module
import { NativeScriptUIListViewModule } from 'nativescript-ui-listview/angular'; - tns run android
Error: System.err: Calling js method onCreateView failed System.err: Error: JNI Exception occurred (SIGABRT). System.err: ======= System.err: Check the ‘adb logcat’ for additional information about the error. System.err: ======= System.err: System.err: System.err: StackTrace: System.err: updateSelectionBehavior(file: node_modules\nativescript-ui-listview\ui-listview.android.js:1933:0) System.err: at createNativeView(file: node_modules\nativescript-ui-listview\ui-listview.android.js:1120:0) System.err: at _setupUI(file: node_modules@nativescript\core\ui\core\view-base\index.js:524:0) System.err: at (file: node_modules@nativescript\core\ui\core\view-base\index.js:566:0) System.err: at eachChildView(file: node_modules@nativescript\core\ui\layouts\layout-base-common.js:101:0) System.err: at eachChild(file: node_modules@nativescript\core\ui\core\view\view-common.js:700:0) System.err: at _setupUI(file: node_modules@nativescript\core\ui\core\view-base\index.js:565:0) System.err: at (file: node_modules@nativescript\core\ui\core\view-base\index.js:566:0) System.err: at eachChildView(file: node_modules@nativescript\core\ui\layouts\layout-base-common.js:101:0) System.err: at eachChild(file: node_modules@nativescript\core\ui\core\view\view-common.js:700:0) System.err: at _setupUI(file: node_modules@nativescript\core\ui\core\view-base\index.js:565:0) System.err: at (file: node_modules@nativescript\core\ui\core\view-base\index.js:566:0) System.err: at eachChildView(file: node_modules@nativescript\core\ui\content-view\index.js:65:0) System.err: at eachChildView(file: node_modules@nativescript\core\ui\page\page-common.js:99:0) System.err: at eachChild(file: node_modules@nativescript\core\ui\core\view\view-common.js:700:0) System.err: at _setupUI(file: node_modules@nativescript\core\ui\core\view-base\index.js:565:0) System.err: at _addViewCore(file: node_modules@nativescript\core\ui\core\view-base\index.js:428:0) System.err: at _addView(file: node_modules@nativescript\core\ui\core\view-base\index.js:417:0) System.err: at onCreateView(file: node_modules@nativescript\core\ui\frame\index.android.js:738:0) System.err: at onCreateView(file: node_modules@nativescript\core\ui\frame\fragment.android.js:25:0) System.err: at com.tns.Runtime.callJSMethodNative(Native Method) System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1286)System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1173) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1160) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1138) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1134) System.err: at com.tns.FragmentClass.onCreateView(FragmentClass.java:55) System.err: at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2439) System.err: at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1460) System.err: at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784) System.err: at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852) System.err: at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:802) System.err: at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManager.java:2625) System.err: at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411) System.err: at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366) System.err: at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2273) System.err: at androidx.fragment.app.FragmentManagerImpl$1.run(FragmentManager.java:733) System.err: at android.os.Handler.handleCallback(Handler.java:873) System.err: at android.os.Handler.dispatchMessage(Handler.java:99) System.err: at android.os.Looper.loop(Looper.java:193) System.err: at android.app.ActivityThread.main(ActivityThread.java:6669) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Package.json
{ "nativescript": { "id": "org.nativescript.sampleapp", "tns-ios": { "version": "6.5.2" }, "tns-android": { "version": "6.5.3" } }, "description": "NativeScript Application", "license": "SEE LICENSE IN <your-license-filename>", "repository": "<fill-your-repository-here>", "scripts": { "clean": "npx rimraf hooks node_modules package-lock.json platforms", "ngcc": "ngcc --properties es2015 module main --first-only", "postinstall": "npm run ngcc" }, "dependencies": { "@angular/animations": "~10.0.0", "@angular/common": "~10.0.0", "@angular/compiler": "~10.0.0", "@angular/core": "~10.0.0", "@angular/forms": "~10.0.0", "@angular/platform-browser": "~10.0.0", "@angular/platform-browser-dynamic": "~10.0.0", "@angular/router": "~10.0.0", "@nativescript/angular": "rc", "@nativescript/core": "rc", "@nativescript/theme": "~2.3.0", "nativescript-ui-listview": "rc", "reflect-metadata": "~0.1.12", "rxjs": "^6.5.0", "zone.js": "~0.10.3" }, "devDependencies": { "@angular/compiler-cli": "~10.0.0", "@nativescript/types": "rc", "@nativescript/webpack": "rc", "@ngtools/webpack": "~10.0.0", "typescript": "~3.9.0" }, "readme": "NativeScript Application" }
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (5 by maintainers)
confirming that latest nsc temaplate and nativescript-ui-listview: 9.0.1 is working for radlist. Thanks @NathanWalker and @mohammadrafigh for tips.
QQ: what is the recommended approach for plugins that are not updated to latest tns version (ie have tns* dependencies)? Is it better to download the source and update the package and use “tns plugin add xxx.tgz” until the plugin owner is releasing a compatible package? I will try to contribute by PR to those plugins, but priority is to get the App updated first.