NAXAM/mapbox-android-binding

Can't upgrade to version 5.5.1.1

klzig opened this issue · 2 comments

klzig commented

I have a MapBox MapView working in a xamarin.android app using naxam.mapbox.droid version 4.2.2. After upgrading to version 5.5.1.1 via nuget I get the following build error:

Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Xamarin.GooglePlayServices.Base, Version=1.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?

I can get past this error by installing the following packages:
Naxam.MapboxNavigation.Droid
Naxam.MapboxNavigationUI.Droid

But then I get this build error:
java.lang.IllegalArgumentException: already added : Lokhttp3/Address; CycleTrip.Android

And I'm left with a bunch of Google Play packages installed. I didn't need GooglePlayServices before and don't think I should need them now to use mapbox-android-sdk.

How can I get this to build without the Google dependencies?

Thank you for providing these bindings. Any help appreciated.

Hey,

I guess you installed Mapbox package from very old version.

Plz remove all NAXAM packages, then add latest Mapbox package again.

Cheers.

klzig commented

Well I swear I started with version 5.5.1.1 and these errors led me back to 4.2.2. But after following your advice, it works. Thanks so much for your rapid response!

One note: I think because I'm loading the map in a fragment instead of an activity, I had to change onDestroy() to onDestroyView() to avoid a runtime crash when unloading the map. Otherwise the NAXAM blog post https://blogs.naxam.net/using-mapbox-in-xamarin-android-7ffe2466f5f7 was quite helpful.

        public override void OnDestroyView()
        {
            mapView.OnDestroy();
            base.OnDestroyView();
        }

Thanks again for providing these bindings as well as some excellent blog posts on using them.