简体   繁体   English

Xamarin Forms / Android map app在模拟器上运行,但在物理设备上崩溃

[英]Xamarin Forms/Android map app runs on emulator, but crashes on physical device

I'm trying to create a simple map app with the ArcGIS Runtime SDK for Xamarin, with the Xamarin.Forms option, so far with just the Android version (don't have access to a Mac for iOS yet). 我正在尝试使用Xamarin.Forms选项和用于Xamarin的ArcGIS Runtime SDK创建一个简单的地图应用程序,到目前为止,仅使用Android版本(目前尚无法访问Mac for iOS)。 I can run the app just fine on an emulator. 我可以在模拟器上正常运行该应用程序。 But when I deploy it to my physical Android tablet (Nexus 7 w/5.0.1), the app crashes when it goes to display the map. 但是,当我将其部署到物理Android平板电脑(Nexus 7 w / 5.0.1)时,该应用会在显示地图时崩溃。 I've even packaged it up and had a friend deploy it to their new Samsung phone and it also crashes there. 我什至已经打包好了,并让一个朋友将其部署到了他们的新三星手机上,它也在那里崩溃了。

Code is extremely simple. 代码非常简单。 Here's the entire main method in the shared code ContentPage class (the ArcGIS SDK only supports the shared code approach): 这是共享代码ContentPage类中的整个主要方法(ArcGIS SDK仅支持共享代码方法):

InitializeComponent ();

myMap = new Map(Basemap.CreateImagery());

// MyMapView is in the XAML markup
MyMapView.Map = myMap;

The app crashes with the "Unfortunately (app name) has stopped". 应用程序崩溃并显示“不幸的是(应用程序名称)已停止”。 In Visual Studio, the output includes this: 在Visual Studio中,输出包括以下内容:

Java.Lang.IllegalArgumentException: No configs match configSpec

05-16 10:24:24.083 E/AndroidRuntime(24893): FATAL EXCEPTION: GLThread 1373
05-16 10:24:24.083 E/AndroidRuntime(24893): Process: ArcGisMapTest.Droid, PID: 24893
05-16 10:24:24.083 E/AndroidRuntime(24893): java.lang.IllegalArgumentException: No configs match configSpec
05-16 10:24:24.083 E/AndroidRuntime(24893): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:858)
05-16 10:24:24.083 E/AndroidRuntime(24893): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1023)
05-16 10:24:24.083 E/AndroidRuntime(24893): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1400)
05-16 10:24:24.083 E/AndroidRuntime(24893): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)

Based on other online posts for the configSpec error message, this would seem to be an OpenGL issue. 根据configSpec错误消息的其他在线帖子,这似乎是OpenGL问题。 But the physical devices appear to support the required OpenGL ES 2.0. 但是物理设备似乎支持必需的OpenGL ES 2.0。 I'm also able to run a little app with the sample code at https://developer.xamarin.com/api/type/Xamarin.Forms.OpenGLView/ 我还可以在https://developer.xamarin.com/api/type/Xamarin.Forms.OpenGLView/上运行带有示例代码的小应用程序

I've also run both the ESRI Xamarin.Forms samples and the Xamarin.Android samples on the emulator and devices, with the same result. 我还在模拟器和设备上运行了ESRI Xamarin.Forms示例和Xamarin.Android示例,结果相同。 Any ideas as to cause here? 有什么想法要引起这里吗?

如果是opengl错误,则可能检查设备上的开发人员选项,并确保在那里启用了opengl 2.0。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android在设备上运行,但在模拟器上崩溃 - Android runs on device but crashes on emulator Xamarin.Forms应用程序在设备上的MigrateAsync而非模拟器上崩溃 - Xamarin.Forms app crashes on MigrateAsync on the device but not on the emulator Xamarin表单Android应用程序崩溃使用VS Android模拟器运行调试 - Xamarin Forms Android App Crashes Running Debug with VS Android Emulator 应用程序在模拟器上运行良好,但在设备上崩溃 - App runs fine on emulator but crashes on device 应用程序在模拟器上运行正常,但在真实设备上崩溃 - App runs fine on emulator, but crashes on real device Flutter 应用程序在 android 工作室模拟器上完美运行,但 go 无法通过物理设备上的加载屏幕 - Flutter app runs perfectly on android studio emulator but doesn't go past the loading screen on physical device 仅在物理设备而非模拟器上运行 Android 应用 - Run Android app Only on Physical Device not Emulator Android 应用程序在物理设备而非模拟器上崩溃:“Parcel: dup() 在 Parcel::read 中失败 [...] 错误:打开的文件太多” - Android App Crashes on Physical Device But Not Emulator: “Parcel: dup() failed in Parcel::read […] error: Too many open files” Expo 应用程序在 ios 和模拟器上运行,但不在 android 设备上运行 - Expo app runs on ios and emulator but not on android device Android应用只能在模拟器上运行,而不能在设备上运行 - Android app runs only on emulator but not on device
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM