ProgressNS / nativescript-ui-feedback

This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115 stars 21 forks source link

nativescript-ui-sidedrawer - Unable to start activity ComponentInfob Calling js method onCreate failed #1558

Closed AAlex-11 closed 6 months ago

AAlex-11 commented 6 months ago

Hello, what I doing wrong? This is my top html:

 <RadSideDrawer>
   <Button ... ></Button>
     <StackLayout MainContent>
     <page-router-outlet></page-router-outlet>
   </StackLayout>
</RadSideDrawer>

I have add this module to app.module.ts

 ...
 import { NativeScriptUISideDrawerModule } from 'nativescript-ui-sidedrawer/angular'
@NgModule({
      imports: [
        NativeScriptUISideDrawerModule,
  ...

and implement on app.component.ts 3 method for working with driver

 ...
 import { RadSideDrawerComponent } from "nativescript-ui-sidedrawer/angular";
 import { RadSideDrawer } from "nativescript-ui-sidedrawer";

 export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
     @ViewChild(RadSideDrawerComponent) drawerComponent: RadSideDrawerComponent;
     private drawerSub: Subscription;
     private drawer: RadSideDrawer;

     constructor(
        private uiService: UIService,
        private changeDetectionRef: ChangeDetectorRef,
        private vcRef: ViewContainerRef
    ) {}
  ...

than:

 Project successfully built.
 Build time: 23.937 s.
 The build result is located at: ...\platforms\android\app\build\outputs\apk\debug\app-debug.apk
 Installing on device emulator-5554...
 Successfully installed on device with identifier 'emulator-5554'.
 Restarting application on device emulator-5554...
 ...
 AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.MyX/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
 AndroidRuntime: TypeError: Cannot read properties of undefined (reading 'nativeView')
 ...
 System.err: An uncaught Exception occurred on "main" thread.
 System.err: Unable to start activity ComponentInfo{org.nativescript.MyX/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
 System.err: TypeError: Cannot read properties of undefined (reading 'nativeView')

All software version is fresh and latest for current moment.

   "dependencies": {
     "@angular/animations": "~16.2.0",
     "@angular/common": "~16.2.0",
     "@angular/compiler": "~16.2.0",
     "@angular/core": "~16.2.0",
     "@angular/forms": "~16.2.0",
     "@angular/platform-browser": "~16.2.0",
     "@angular/platform-browser-dynamic": "~16.2.0",
     "@angular/router": "~16.2.0",
     "@nativescript/angular": "^16.0.0",
     "@nativescript/core": "~8.6.0",
     "@nativescript/theme": "~3.0.2",
     "nativescript-ui-sidedrawer": "^15.2.3",
     "rxjs": "~7.8.0",
    "zone.js": "~0.13.0"
   },
    "devDependencies": {
    "@angular-devkit/build-angular": "~16.2.0",
    "@angular/compiler-cli": "~16.2.0",
    "@nativescript/android": "8.6.2",
    "@nativescript/types": "~8.6.0",
    "@nativescript/webpack": "~5.0.18",
    "@ngtools/webpack": "~16.2.0",
    "typescript": "~5.1.6"
   }
AAlex-11 commented 6 months ago

I found another driver https://github.com/nativescript-community/ui-drawer and it working fine

drawer-03312024_005420