我能够很好地运行该应用程序,并进行所有选择,而不会在Android 8.0模拟器上崩溃。
在Android 6.0模拟器上,当我在这张照片中选择“机场”或“跑道”菜单时,它会崩溃,而其他菜单则没有(特别是飞机菜单与这两个菜单具有相同的代码) 菜单截图
在App.vue中,前两个有一部分xml代码(包括飞机-请牢记。.aircraft菜单有效)
<CardView col="0" row="0" class="cardStyle" elevation="40" radius="10">
<StackLayout class="cardContent" >
<Label text="Airport Name:"/>
<TextField :text="SelectedAirportName" hint="Tap to Select" editable="false" @tap="onCustomArprtTap" />
</StackLayout>
</CardView>
<CardView col="1" row="0" class="cardStyle" elevation="40" radius="10">
<StackLayout class="cardContent">
<Label text="Heading:"/>
<TextField :isEnabled="AirportSelected" :text="SelectedRunway" hint="Tap to Select" editable="false" @tap="onCustomHeadingTap" />
</StackLayout>
</CardView>
<CardView col="0" row="1" colSpan="2" class="cardStyle" elevation="40" radius="10">
<StackLayout class="cardContent">
<Label textWrap="true" text="Aircraft:"/>
<TextField :text="SelectedAircraftLine" hint="Tap to Select" editable="false" @tap="onCustomArcrftTap"/>
</StackLayout>
</CardView>
创建机场模态的链接为AirportList.vue
,创建跑道模态的链接为RunwayList.vue
,指向(工作中的)飞机模态的链接为AircraftList.vue
,当我单击屏幕快照中的“机场”菜单时,出现以下错误:
An uncaught Exception occurred on "main" thread.
com.tns.NativeScriptException:
Calling js method onSingleTapUp failed
Error: java.lang.NoSuchFieldError: no "I" field "AXIS_RELATIVE_X" in
class "Landroid/view/MotionEvent;" or its superclasses
com.tns.Runtime.callJSMethodNative(Native Method)
com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1120)
com.tns.Runtime.callJSMethodImpl(Runtime.java:1000)
com.tns.Runtime.callJSMethod(Runtime.java:987)
com.tns.Runtime.callJSMethod(Runtime.java:967)
com.tns.Runtime.callJSMethod(Runtime.java:959)
com.tns.gen.android.view.GestureDetector_SimpleOnGestureListener_vendor_65760_26_TapAndDoubleTapGestureListenerImpl.onSingleTapUp(GestureDetector_SimpleOnGestureListener_vendor_65760_26_TapAndDoubleTapGestureListenerImpl.java:17)
android.view.GestureDetector.onTouchEvent(GestureDetector.java:635)
android.support.v4.view.GestureDetectorCompat$GestureDetectorCompatImplJellybeanMr2.onTouchEvent(GestureDetectorCompat.java:480)
android.support.v4.view.GestureDetectorCompat.onTouchEvent(GestureDetectorCompat.java:543)
com.tns.Runtime.callJSMethodNative(Native Method)
com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1120)
com.tns.Runtime.callJSMethodImpl(Runtime.java:1000)
com.tns.Runtime.callJSMethod(Runtime.java:987)
com.tns.Runtime.callJSMethod(Runtime.java:967)
com.tns.Runtime.callJSMethod(Runtime.java:959)
com.tns.gen.java.lang.Object_vendor_59746_26_TouchListenerImpl.onTouch(Object_vendor_59746_26_TouchListenerImpl.java:18)
android.view.View.dispatchTouchEvent(View.java:9290)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2403)
com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1737)
android.app.Activity.dispatchTouchEvent(Activity.java:2765)
android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2364)
android.view.View.dispatchPointerEvent(View.java:9514)
android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4230)
android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4096)
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695)
android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661)
android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3787)
android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669)
android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3844)
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695)
android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661)
android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669)
android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5922)
android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5896)
android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5857)
android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6025)
android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
android.os.MessageQueue.nativePollOnce(Native Method)
android.os.MessageQueue.next(MessageQueue.java:323)
android.os.Looper.loop(Looper.java:135)
android.app.ActivityThread.main(ActivityThread.java:5417)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
File: "file:///data/data/org.nativescript.application/files/app/vendor.js, line: 27669, column: 16
StackTrace:
Frame: function:'formatProperty',
我无法解决。我感到困惑的是,它可以在Android 8.0模拟器上正常运行,但不能在Android 6.0上运行