Я новичок в NativeScript
. После того, как я обновил NativeScript
до 5.0.0
, когда я создаю проект по умолчанию и запускаю с помощью команды tns run android
, выдается следующая ошибка:
System.err: com.tns.NativeScriptException:
System.err: Calling js method onViewAttachedToWindow failed
System.err: TypeError: this._context.getSupportFragmentManager is not a function
System.err: File: "file:///data/data/org.nativescript.DemoApp/files/app/tns_modules/tns-core-modules/ui/core/view/view.js, line: 190, column: 46
System.err: StackTrace:
System.err: Frame: function:'View._getRootFragmentManager', file:'file:///data/data/org.nativescript.DemoApp/files/app/tns_modules/tns-core-modules/ui/core/view/view.js', line: 190, column: 47
System.err: Frame: function:'View._getFragmentManager', file:'file:///data/data/org.nativescript.DemoApp/files/app/tns_modules/tns-core-modules/ui/core/view/view.js', line: 215, column: 32
System.err: Frame: function:'Frame._processNextNavigationEntry', file:'file:///data/data/org.nativescript.DemoApp/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 134, column: 28
System.err: Frame: function:'Frame._onAttachedToWindow', file:'file:///data/data/org.nativescript.DemoApp/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 118, column: 14
System.err: Frame: function:'AttachListener.onViewAttachedToWindow', file:'file:///data/data/org.nativescript.DemoApp/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 35, column: 27
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:996)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:983)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:967)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:959)
System.err: at com.tns.gen.java.lang.Object_frame_29_36_AttachListener.onViewAttachedToWindow(Object_frame_29_36_AttachListener.java:17)
System.err: at android.view.View.dispatchAttachedToWindow(View.java:13554)
System.err: at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2690)
System.err: at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2697)
System.err: at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2697)
System.err: at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2697)
System.err: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1322)
System.err: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1084)
System.err: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5990)
System.err: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
System.err: at android.view.Choreographer.doCallbacks(Choreographer.java:580)
System.err: at android.view.Choreographer.doFrame(Choreographer.java:550)
System.err: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
System.err: at android.os.Handler.handleCallback(Handler.java:739)
System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
System.err: at android.os.Looper.loop(Looper.java:135)
System.err: at android.app.ActivityThread.main(ActivityThread.java:5343)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at java.lang.reflect.Method.invoke(Method.java:372)
System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
ActivityManager: Process org.nativescript.DemoApp (pid 22172) has died
Пожалуйста, помогите мне с ответом. Я столкнулся с этой проблемой, так как я обновил свой NativeScript
Version
.