Android Debugging Failing With "Couldn't connect to logcat, GetProcessId returned: 0" FFImageLoading.Platform.dll.so Not Found

pixel picture pixel · Sep 19, 2017 · Viewed 9.4k times · Source

I am having issue debugging Android project. I can deploy to device and run it, all works fine but if I try to debug, the app gets deployed to the device and very briefly opened, splash screen shows up but the app then closes.

I am using Xamarin Forms on Visual Studio 2015.

Device is running Android Oreo (8.0.0). Another device running Android 6.0.1 is debugging fine.

The output shows following:

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

I checked Logcat and it seem to be having issues finding FFImageLoading library:

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

I have added Nuget package for FFImageLoading to my projects and Droid project references show it as in image below:

enter image description here

Answer

Prateek Gupta picture Prateek Gupta · Jan 21, 2018

This worked for me :-

Deselecting the 'Use Shared Runtime' in Project Properties > Android Options > Packaging properties