我有一个针对iOS和Android构建的Xamarin.Forms应用。从Visual Studio(在“调试”或“发布”模式下以及在仿真器或设备上)进行测试时,该应用程序可以正常运行。但是,当我尝试通过AppCenter进行部署时,该应用程序可以在iOS和Android上运行,它会显示SplashScreen,然后显示空白的白页。我的控件完全没有显示出来……在iOS上运行正常,因此“视图”似乎是正确的。
我连接了Android设备监视器,但似乎没有收到任何错误消息。我尝试了一些项目属性更改(打开和关闭ProGuard和MultiDex;更改了链接器设置),但是似乎没有任何改变。
我什至没有想法去寻找问题……有人有什么建议吗?有没有人见过这个?是否有任何地方列出了Visual Studio和AppCenter之间的构建差异?
更新:我从设备监视器中获得了一些其他日志记录。该版本中还有其他日志条目有效,因此,似乎已部署的版本中没有运行某些日志(可能与Google Maps相关联?)。
无法正常运行的版本包含以下两行:
01-09 07:23:04.378: I/Google Maps Android API(11219): Google Play services client version: 11400000
01-09 07:23:04.709: I/LaunchCheckinHandler(1410): Displayed {my application name}/md582f1e314fc580d8ae4e7bb0d59c62d55.MainActivity,wp,ca,537
有效的版本具有以下额外的日志条目:
01-09 07:28:29.970: I/Google Maps Android API(12443): Google Play services client version: 11400000
01-09 07:28:31.807: I/SFPerfTracer(735): triggers: (rate: 0:0) (9563 sw vsyncs) (0 skipped) (121:40138 vsyncs) (123:54057)
01-09 07:28:32.279: I/SFPerfTracer(735): triggers: (rate: 6:1097) (compose: 0:0) (post: 0:3) (render: 0:4) (125:27407 frames) (126:32007)
01-09 07:28:32.279: D/SFPerfTracer(735): layers: (2:8) (StatusBar#0 (0xaf154000): 4:4927)* (com.android.systemui.ImageWallpaper#0 (0xaf113000): 0:228)* (DimLayerController/Stack=0#0 (0xaf10c000): 0:373)* (animation background stackId=1#0 (0xaf192000): 0:20)* (NavigationBar#0 (0xaf445000): 0:493) (com.android.launcher3/com.android.launcher3.CustomizationPanelLauncher#0 (0xaf424000): 0:14)* (com.android.launcher3/com.android.launcher3.CustomizationPanelLauncher#1 (0xaf2fa000): 0:154)* ({my application name}/md582f1e314fc580d8ae4e7bb0d59c62d55.SplashActivity#0 (0xaf437000): 0:3)
01-09 07:28:32.514: W/zygote(12443): JNI RegisterNativeMethods: attempt to register 0 native methods for md58432a647068b097f9637064b8985a5e0.ViewRenderer_2
01-09 07:28:32.652: W/zygote(12443): JNI RegisterNativeMethods: attempt to register 0 native methods for md51558244f76c53b6aeda52c8a337f2c37.ActivityIndicatorRenderer
01-09 07:28:32.764: I/ThermalEngine(967): Thermal-Server: Thermal received msg from override
01-09 07:28:32.764: I/Thermal-Lib(721): Thermal-Lib-Client: Client request sent
01-09 07:28:32.947: W/zygote(12443): JNI RegisterNativeMethods: attempt to register 0 native methods for md51558244f76c53b6aeda52c8a337f2c37.TableViewRenderer
01-09 07:28:33.055: W/zygote(12443): JNI RegisterNativeMethods: attempt to register 0 native methods for md51558244f76c53b6aeda52c8a337f2c37.BaseCellView
01-09 07:28:33.055: W/zygote(12443): JNI RegisterNativeMethods: attempt to register 0 native methods for md51558244f76c53b6aeda52c8a337f2c37.TextCellRenderer_TextCellView
01-09 07:28:33.083: W/zygote(12443): JNI RegisterNativeMethods: attempt to register 0 native methods for md51558244f76c53b6aeda52c8a337f2c37.CellRenderer_RendererHolder
01-09 07:28:33.172: W/View(12443): requestLayout() improperly called by md51558244f76c53b6aeda52c8a337f2c37.ScrollViewContainer{3f9ae0f V.E...... ......ID 0,0-1080,1444} during layout: running second layout pass**
01-09 07:28:33.325: I/LaunchCheckinHandler(1410): Displayed {my application name}/md582f1e314fc580d8ae4e7bb0d59c62d55.MainActivity,wp,ca,3558
任何人都可以将这些日志消息翻译成英文,这样我就知道在哪里可以找到问题了?部署Google地图与进行调试/测试相比,是否还有其他需要做的事情?
谢谢。
答案 0 :(得分:0)
这可能与OP的问题无关,但我今天有相同的症状: 从VS部署后,应用在Android上运行良好。 从MDM提供商部署时黑屏(在我的情况下是Airwatch Workspace ONE)。 日志中没有提供有用的信息,也没有发生错误。
我通过取消选中“ Android选项”->“使用共享运行时”来修复它