竖屏java转横屏_HBuilderX在页面里面lockOrientation竖屏转横屏,报错java.lang.NullPointerException...「终于解决」

Java (103) 2023-06-06 15:12

Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说竖屏java转横屏_HBuilderX在页面里面lockOrientation竖屏转横屏,报错java.lang.NullPointerException...「终于解决」,希望能够帮助你!!!。

在页面里面使用plus.screen.lockOrientation(‘landscape-primary’); 转横屏,报一下错误

java.lang.NullPointerException: Attempt to invoke interface method ‘io.dcloud.common.DHInterface.IApp io.dcloud.common.DHInterface.IFrameView.obtainApp()’ on a null object reference

at io.dcloud.common.core.ui.f.obtainApp(DHWebview.java:97)

at io.dcloud.common.adapter.ui.CustomeizedInputConnection.showRecordView(CustomeizedInputConnection.java:92)

at io.dcloud.common.adapter.ui.CustomeizedInputConnection.showRecordView(CustomeizedInputConnection.java:89)

at io.dcloud.common.core.ui.b$b.onSizeChanged(DHAppRootView.java:1586)

at android.view.View.sizeChange(View.java:19914)

at android.view.View.setFrame(View.java:19875)

at android.view.View.layout(View.java:19778)

at android.view.ViewGroup.layout(ViewGroup.java:6144)

at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325)

at android.widget.FrameLayout.onLayout(FrameLayout.java:261)

at android.view.View.layout(View.java:19781)

at android.view.ViewGroup.layout(ViewGroup.java:6144)

at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325)

at android.widget.FrameLayout.onLayout(FrameLayout.java:261)

at android.view.View.layout(View.java:19781)

at android.view.ViewGroup.layout(ViewGroup.java:6144)

at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1816)

at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1660)

at android.widget.LinearLayout.onLayout(LinearLayout.java:1569)

at android.view.View.layout(View.java:19781)

at android.view.ViewGroup.layout(ViewGroup.java:6144)

at android.widget.FrameLayout.layoutChildren(FrameLayout.java:325)

at android.widget.FrameLayout.onLayout(FrameLayout.java:261)

at com.android.internal.policy.DecorView.onLayout(DecorView.java:888)

at android.view.View.layout(View.java:19781)

at android.view.ViewGroup.layout(ViewGroup.java:6144)

at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2653)

at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2356)

at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1512)

at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7218)

at android.view.Choreographer$CallbackRecord.run(Choreographer.java:981)

at android.view.Choreographer.doCallbacks(Choreographer.java:790)

at android.view.Choreographer.doFrame(Choreographer.java:721)

at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:967)

at android.os.Handler.handleCallback(Handler.java:808)

at android.os.Handler.dispatchMessage(Handler.java:101)

at android.os.Looper.loop(Looper.java:218)

at android.app.ActivityThread.main(ActivityThread.java:7425)

at java.lang.reflect.Method.invoke(Native Method)

at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)

·回复

问题已确认下版修复

·回复

HBuilderX 2.5.5+ 已修复

发表回复