Select to view content in your preferred language

Xamarin Esri Issues After 64 Bit Google Requirement

1391
8
07-05-2019 11:34 AM
JakeCharles
Emerging Contributor

I have a Xamarin Android application. I have added the arm64-v8a build for the required 64 Bit option from Google. I had to upgrade the Esri.ArcGISRuntime nuget package to the latest version to do this. When it calls the ArcGISRuntimeEnvironment.SetLicense method it blows up saying "System.IO.FileNotFoundException: Invalid Image". This reminded me of a linking issue so I double checked and I'm able to reproduce this error with linking disabled. Any ideas as to what the issue is?

Thanks,

Tags (1)
0 Kudos
8 Replies
dotMorten_esri
Esri Notable Contributor

Does this also happen if you create a new android app ?
Also try uninstalling the app, + deleting the \obj\ and \bin\ folders and then rebuild+deploy.

0 Kudos
JakeCharles
Emerging Contributor

Morten, I tried uninstalling and deleting to the bin/obj folders and did clean/rebuild/deploy. That didn't fix the issue. I did create a new Xamarin.Android project and was not able to reproduce the issue. I matched the manifest to be the same too.

0 Kudos
JakeCharles
Emerging Contributor

Any update on this? Has anyone else run into this issue?

0 Kudos
dotMorten_esri
Esri Notable Contributor

I see this from time to time with the Xamarin tooling. Typically uninstalling the app, cleaning out obj and bin folders and restarting Visual Studio would often resolve it. Other times, I'll leave for the day and the next day it'll just magically work again. It's a frustrating Xamarin bug

0 Kudos
JakeCharles
Emerging Contributor

Morten,

Is there any other work around? I have tried what you have suggested, and even going as far as blowing away my entire source folder, deleting/recreating emulators, tried on physical devices. I have upgraded the package to the latest version (100.6). I have other applications that use this and when I went to update the package it had the same exact problem. This is becoming urgent as I cannot update my applications! I can easily reproduce this on all three of my Xamarin.Android projects that had the older runtime package, and upgraded to the latest version. All three will throw this invalid image error.

EDIT: Here is some output from the debugger:

09-10 13:04:39.335 D/Mono (15761): Assembly Loader probing location: '/Users/builder/jenkins/workspace/xamarin-android-d15-9/xamarin-android/external/mono/sdks/out/android-x86-release/lib/mono/gac/Esri.ArcGISRuntime.resources/100.6.0.0_en-us_8fc3cc631e44ad86/Esri.ArcGISRuntime.resources.dll'.
09-10 13:04:39.335 D/Mono (15761): Assembly Loader probing location: '/Users/builder/jenkins/workspace/xamarin-android-d15-9/xamarin-android/external/mono/sdks/out/android-x86-release/lib/Esri.ArcGISRuntime.resources.dll'.
09-10 13:04:39.336 D/Mono (15761): Assembly Loader probing location: '/Users/builder/jenkins/workspace/xamarin-android-d15-9/xamarin-android/external/mono/sdks/out/android-x86-release/lib/mono/gac/Esri.ArcGISRuntime.resources/100.6.0.0_en-us_8fc3cc631e44ad86/Esri.ArcGISRuntime.resources.exe'.
09-10 13:04:39.337 D/Mono (15761): Assembly Loader probing location: '/Users/builder/jenkins/workspace/xamarin-android-d15-9/xamarin-android/external/mono/sdks/out/android-x86-release/lib/Esri.ArcGISRuntime.resources.exe'.
09-10 13:04:39.389 D/Mono (15761): Assembly Loader probing location: 'en-US/Esri.ArcGISRuntime.resources.dll'.
Exception:

System.IO.FileNotFoundException: Invalid Image

It appears to be missing the Esri.ArcGISRuntime.resources.dll. I do not see an English folder or this file in the parent folder.

Thanks,

0 Kudos
dotMorten_esri
Esri Notable Contributor

I'm not aware of any - it's most likely a Xamarin problem so their forums would be good to reach out in. The fact that a new app doesn't exhibit this behavior indicates something in the project/device has gone wrong for that app. You could move the code over the functioning project instead?
Does this problem also happen if you deploy to a different device?

0 Kudos
JakeCharles
Emerging Contributor

I figured out that the nuget package doesn't have an English folder for the Esri.ArcGISRuntime.resources.dll file. I created this folder locally using the United Kingdom dll and it works fine now. I think the nuget package needs to be updated to have this English folder.

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Jake,

Can you provide more details about the folder you created?

What's the default locale for you app?

Cheers

Mike

0 Kudos