Problem after upgrading my Xamarin app with ArcGIS.Net 100.1

2974
8
06-30-2017 09:26 AM
EricDUCOS1
New Contributor III

Hi,

I just upgraded my Nuget packages in my Xamarin Soution to the last 100.1 version of all components.

Now, my Android app does not show anymore my map.(the map is displayed through a MapView using a WebMap url)

Is there some additional steps to do after upgarding on android plateform ?

Is there some change in the lifecycle of initializing the things ?

I do not have the problem on the UWP plateform.

Regards.

Eric.

0 Kudos
8 Replies
ChadYoder1
Occasional Contributor II

Same issue here, upgrade worked straight away on iOS and UWP, but map never loads on Android.  

Have not had time to investigate where things seem hosed, but will do so and post more info here.

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

If you're running the app on the Visual Studio Emulator for Android, note that we have a known issue in v100.1 where vector tiled layers do not display in that environment (unfortunately when checking the graphics capabilities of the "device" the Hyper-V architecture does not report the level of support we expect/need): Release notes for 100.1—ArcGIS Runtime SDK for .NET (WPF) | ArcGIS for Developers

Otherwise, please can you provide more details on your Android project? You mention UWP, so it sounds like you're building for Xamarin.Forms. 

- What environment are you testing the Android app in? If it's an emulator, please list which one. If it's a device, please provide as many details about the device as possible.

- What content does your map have? 

- Are you build debug or release?

- What architectures are enabled in your project? 

- What versions of Xamarin components are you currently using?

- Any other information you can provide about your machine(s), OS versions, Visual Studio versions, Android/Java SDK versions would be appreciated too.

- Could you also attach a simple self-contained repro app?

Cheers

Mike

0 Kudos
ChadYoder1
Occasional Contributor II

Yes, I am building for Xamarin.Forms using Xamarin Studio on a Mac.  Testing for far has only been in an emulator.  The same exact code works when I run in v100, but fails in v100.1. 

I'm debugging/testing on a Samsung Galaxy S8 emulator using Genymotion, API 24.  

I have the following architectures enabled: armeabi, armeabi-v7A, x86.  I tried to enable arm64-v8a but got an error that Runtime does not support this architecture.

I have Android SDK Tools 25.2.5 installed and Android SDK Platform-tools 25.0.3.

Using Xamarin.Forms v 2.3.3.152-pre2.  

Again, same code works in v100 in the same emulator, but not in v100.1

I'll try to pull out the code and/or send along a sample app to repro the issue.

Thanks.

0 Kudos
ChadYoder1
Occasional Contributor II

Little more on this issue:  I created a new emulator to test a "clean" v100.1 version of the app and well....it worked.

Maybe there are some remnants that remained after using v100, then rebuilding the app with v 100.1.

I'll try to reproduce again tomorrow by creating a clean emulator, building and using the v100 app, then upgrading and deploying the v100.1 app to the same device.

I'll be sure to post the results here.

0 Kudos
EricDUCOS1
New Contributor III

Hi,

Good news !!!

Seems to be some remnants…

I have done a clean of the project, rebuild all.

I un installed the app from my device and redeployed it.

Now it works !!!

Strange…

Regards.

Eric DUCOS

De : Chad Yoder

Envoyé : dimanche 2 juillet 2017 16:30

À : Eric DUCOS <Eric.DUCOS@dexip.com>

Objet : Re: - Re: Problem after upgrading my Xamarin app with ArcGIS.Net 100.1

GeoNet <https://community.esri.com/?et=watches.email.thread>

Re: Problem after upgrading my Xamarin app with ArcGIS.Net 100.1

reply from Chad Yoder<https://community.esri.com/people/chad.yoder@nwg?et=watches.email.thread> in ArcGIS Runtime SDK for .NET - View the full discussion<https://community.esri.com/message/697964-re-problem-after-upgrading-my-xamarin-app-with-arcgisnet-1001?commentID=697964&et=watches.email.thread#comment-697964>

0 Kudos
ChadYoder1
Occasional Contributor II

Tracked the issue down to when a feature service is added, here is some code I pulled out that shows the issue.

            //Create the feature layer and add to the map
             string url = "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/DamageAssessment/FeatureServer/0";
 
             FeatureLayer ftrLayer = new FeatureLayer (new Uri (url));
 
             ftrLayer.Loaded += (object sender, EventArgs e) => {
                 //Make sure the layer is loaded
                 if (ftrLayer.FeatureTable.LoadStatus == Esri.ArcGISRuntime.LoadStatus.FailedToLoad) {
                     if (ftrLayer.FeatureTable.LoadError != null)
                         Device.BeginInvokeOnMainThread (() => {
                             ToastHelpers.ShowError ("Layer Load Error", "An error occurred while loading the layer '" + ftrLayer.Name + "'.\n\n" + ftrLayer.FeatureTable.LoadError.Message, 7);
                         });
                     else
                         Device.BeginInvokeOnMainThread (() => {
                             ToastHelpers.ShowError ("Layer Load Error", "An error occurred while loading the layer '" + ftrLayer.Name + "', but the error message does not give any details.  Please contact your application administrator for assistance.", 7);
                         });
                     }
             };
 
             if (ftrLayer.LoadStatus != Esri.ArcGISRuntime.LoadStatus.Loaded)
                 await ftrLayer.LoadAsync ();
             this.EsriMapView.Map.OperationalLayers.Add (ftrLayer);‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Checking the LoadError gives this:

ftrLayer.FeatureTable.LoadError {System.EntryPointNotFoundException: CoreRT_Request_getHttpOperation   at (wrapper managed-to-native)…} System.EntryPointNotFoundException

Attached are some logs from HockeyApp and Xamarin Studio.

Hopefully something here helps, if not, let me know what else you need.

Thanks for your help.

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

The EntryPointNotFoundException indicates that there is a mismatch between the ArcGIS Runtime components in your app. Typically this is due to caching issues during the NuGet update.

I recommend:

- Uninstall the Esri.ArcGISRuntime.* NuGet packages from your project/solution

- Close Visual Studio

- Delete the output and intermediate folders (e.g. bin and obj)

- Find the Packages folder at the root level of your Solution and delete the Esri.ArcGISRuntime.* folders from the packages folder (if the uninstall has not already deleted)

- Run the NuGet command to clear the cache: `nuget.exe locals all -clear`

- Add the the Esri.ArcGISRuntime.* NuGet packages back to your project/solution.

Cheers

Mike

0 Kudos
EricDUCOS1
New Contributor III

Hi,

As I am concerning,

The problem I described was directly seen on a device: a smartphone LG-D855. I did not test on the Visual Studio Emulator for Android.

I confirm that my project is developped using Xamarin.Forms. The version of Xamarin components is the last stable version 2.3.4.247

The Xamarin page include a control that is initialized with such meth in the constructor of the Page

mapView.Map = new Map(new Uri(configService.ServerConfiguration.SigMapUrl));

The SigMapUrl variable points to a WebMap url. This WebMap contains a standard background and some ESRI Shapes

In development phase, I run in DEBUG mode…I did not test using Release mode.

When I upgraded the project, I had to remove the "arm64-v8a" that was working with the previous version of ArcGIS component 100.0, to get my project compiling.

So the enabled architectures in my Android project are: armeabi, armeabi-v7a and x86

Android SDK Tool is at version 25.2.5 and SDK Platform Tools at version 25.0.6

I am using Visual STudio 2017 Entreprise with last update installed

Hope that problem will be found….If not, it will be required to come back to previous version…

Eric DUCOS

De : Michael Branscomb

Envoyé : samedi 1 juillet 2017 22:54

À : Eric DUCOS <Eric.DUCOS@dexip.com>

Objet : Re: - Re: Problem after upgrading my Xamarin app with ArcGIS.Net 100.1

GeoNet <https://community.esri.com/?et=watches.email.thread>

Re: Problem after upgrading my Xamarin app with ArcGIS.Net 100.1

reply from Michael Branscomb<https://community.esri.com/people/MBranscomb-esristaff?et=watches.email.thread> in ArcGIS Runtime SDK for .NET - View the full discussion<https://community.esri.com/message/697949-re-problem-after-upgrading-my-xamarin-app-with-arcgisnet-1001?commentID=697949&et=watches.email.thread#comment-697949>

0 Kudos