I am trying to create a new offline locator for use with a Xamarin app, and I was following this guide:
Offline geocode | ArcGIS for Developers
The example works great in my code with the provided san-diego-locator.loc locator, but whenever I try to go and create my own locator and plug it into this example, I get:
Esri.ArcGISRuntime.ArcGISRuntimeException: 'Invalid response'
I have tried creating a few different new locators with different styles and style releases. I have tried known working locators as well, but can't get it working. I have tried to look at the san-diego-locator.loc but weirdly it doesn't even appear as a valid locator in ArcMap and ArcGIS Pro crashes whenever I try to get information on it. When I look at the locator XML files to compare, they look completely different:
Snippet from what I created, these alias tags make up most of the XML:
Snippet from example, made up of completely different tags:
Any ideas would be appreciated. Any clues on how the locator in the example was made? I am also using Esri.ArcGISRuntime.Xamarin.Forms version 100.7.0 in my Visual Studio project.
It appears you might be running your app as 32-bit. Could you trying running the app as 64-bit with the locators you created ?
If you re-created locators using ArcGIS Pro or ArcMap , they will not work with 32-bit apps but old classic locators do.
That's the reason perhaps Sandiego locator works you but new locators do not.
Isn't ArcGIS Pro already 64 bit? I tried creating a locator in Pro as well but I got the same result.
Yes Pro is 64 bit but these new locators created are not compatible for a 32 bit app. So changing the architecture of your test app to 64-bit should help.
I actually had to disable 64 bit because of this error. Looks like runtime isn't compatible with 64 bit yet?
Severity Code Description Project File Line Suppression State
Error The Esri.ArcGISRuntime.Xamarin.Android package does not currently support building for the x86_64 architecture. Please uncheck this option in Project Settings -> Android Options -> Advanced -> Supported architectures.
But all of the locators I created in ArcGIS Desktop should be 32 bit anyways right?
That's right x86_64 isn't supported yet. For Android you would need a 64 bit device to test this functionality and architectures supported are armv7, armv8 and x86. You will have to set the architecture to armv8 to ensure app is running as 64 bit. Other alternative is that If you have UWP in the forms project, you could use it for testing the locator.
But maybe it matters what tool I use? Create Locator vs Create Address Locator? I will try Create Locator.