Android调试失败"无法连接到logcat,GetProcessId返回:0"FFImageLoading.Platform.dll.so未找到

pix*_*xel 5 xamarin.android xamarin.forms android-6.0-marshmallow ffimageloading android-8.0-oreo

我有调试Android项目的问题.我可以部署到设备并运行它,一切正常但如果我尝试调试,应用程序部署到设备并且非常简短地打开,启动屏幕显示但应用程序然后关闭.

我在Visual Studio 2015上使用Xamarin Forms.

设备正在运行Android Oreo(8.0.0).运行Android 6.0.1的另一台设备正在调试.

输出显示如下:

InspectorDebugSession(11): StateChange: Start -> EntryPointBreakpointRegistered
InspectorDebugSession(11): Constructed
Android application is debugging.
InspectorDebugSession(11): HandleTargetEvent: TargetExited
InspectorDebugSession(11): Disposed
Couldn't connect to logcat, GetProcessId returned: 0
Run Code Online (Sandbox Code Playgroud)

我检查了Logcat,它似乎遇到了查找FFImageLoading库的问题:

Time    Device Name Type    PID Tag Message
09-18 14:35:52.361  Huawei Nexus 6P Debug   1560    Mono    AOT: 
image '/usr/local/lib/mono/aot-cache/arm/FFImageLoading.Platform.dll.so' 
not found: dlopen failed: library "/data/app/myapp.android.dev-
WEb1bz8edgF7vwx6uCoZ-A==/lib/arm/libaot-FFImageLoading.Platform.dll.so" not found
Run Code Online (Sandbox Code Playgroud)

我已经为我的项目添加了用于FFImageLoading的Nuget包,Droid项目引用如下图所示:

在此输入图像描述

Pra*_*pta 11

这对我有用: -

在项目属性> Android选项>包装属性中取消选择"使用共享运行时"

  • 这毫无意义。是为了让调试更快。这不是一个永久的解决方案 (2认同)

小智 5

我在Android 8.1和Visual Studio 2017 15.7.4中也遇到了这个问题。

通过三个步骤可以使它再次运行。

  1. 在“ Android选项”下,转到“高级”并添加您的设备架构,在我的情况下为x86_64。
  2. 转到工具->选项-> Xamarin> Android设置并启用:为共享的运行时库和基类库提供调试符号。
  3. 最后一步是从设备中删除以下应用程序:

    • 所有Xamarin.Android API支持库
    • 单声道共享运行时
    • 您的应用程式

完成这些步骤后,您无需禁用“使用共享的运行时”,并且可以更快地进行部署和调试。


Ste*_*rne 1

这是Visual Studio for Windows 上 Oreo 和 Xamarin Android 的一个已知问题。显然它可以在 Visual Studio for Mac 上运行。它将在即将发布的版本中修复。与此同时,在上面的错误链接底部附近有一个解决方法(评论 20)。