ArcGIS Runtime 100.2.1 crashes on Android 8.0 (API 26)

1973
8
Jump to solution
04-24-2018 06:12 AM
SandeepKuniel1
New Contributor III

We are working with Xamarin Forms + Runtime and this does not seem to work with emulators/devices having android 8. Attached is a simple implementation to replicate the issue.

0 Kudos
1 Solution

Accepted Solutions
RichZwaap
Occasional Contributor III

Just to be extra sure, can you try this?

  1. Uninstall the app from the target device
  2. Delete the output folder (bin folder in the project directory by default)
  3. Delete the intermediate folder (obj folder in the project directory by default)
  4. Rebuild and re-deploy

This is just to ensure that the Mono Shared Runtime and Fast Deployment are no longer being used.

View solution in original post

0 Kudos
8 Replies
RichZwaap
Occasional Contributor III

Have you tried disabling "Use Shared Runtime" and "Use Fast Deployment?"  Those are under Android Options --> Packaging Properties on the project's properties page.  Then uninstall the app from emulator or device and do a full rebuild/redeploy.

0 Kudos
SandeepKuniel1
New Contributor III

Hi Rich,

So there were 2 issues, on the emulator as you suggested.

disabling "Use Shared Runtime" and "Use Fast Deployment?" worked fine with the test app.

But in our app, we had one more issue caused due to the version 4.2.2

ArcGIS Runtime 100.2.1 does not work with Xamarin Forms and Android 4.2.2 

The fix for the above was to include this.

 JavaSystem.LoadLibrary("runtimecore");//which did not work with version 8.

So the final fix was to do this.

if (Build.VERSION.SdkInt <= BuildVersionCodes.JellyBean) 
 JavaSystem.LoadLibrary("runtimecore"); // fix for the android version 4.2

Regards

Sandeep

RichZwaap
Occasional Contributor III

Thanks for letting us know that the LoadLibrary call fails for you on newer versions of Android.  I suspect that will fail on Android 7 and up due to restrictions that were introduce in the loading of 3rd party libraries at run-time.  Also, I would expect that disabling "Shared Runtime" and "Fast Deployment" on Android versions prior to 8.0 is not necessary.  At least, I've not seen a problem with that at earlier versions.

0 Kudos
RAHULPANDIA
New Contributor II

Any update on it?We are facing the same issue.

We have downloaded the runtime (Xamarin) on  27/July/2018, and it is sucessfully running on android api level 24(nugget7.0) but not above it.

Xamarin Forms version:3.0X

The app is workingg in UWP

Arcgis Runitme(.net) is 100.3

0 Kudos
dotMorten_esri
Esri Notable Contributor

Did any of the above suggestion workarounds work for you? Did you update your Xamarin tooling / Visual Studio to the latest version?

0 Kudos
RAHULPANDIA
New Contributor II

Visual studio 2017(have all the latest update)

Disabled the  "Shared Runtime" and "Fast Deployment"

Added the Java runtime

Yes have been updating xamarin forms to version 3

0 Kudos
RichZwaap
Occasional Contributor III

Just to be extra sure, can you try this?

  1. Uninstall the app from the target device
  2. Delete the output folder (bin folder in the project directory by default)
  3. Delete the intermediate folder (obj folder in the project directory by default)
  4. Rebuild and re-deploy

This is just to ensure that the Mono Shared Runtime and Fast Deployment are no longer being used.

0 Kudos
RAHULPANDIA
New Contributor II

Thanks! This solved the issue along with Disabled the  "Shared Runtime" and "Fast Deployment"

0 Kudos