mapbox / mapbox-unity-sdk

Mapbox Unity SDK - https://www.mapbox.com/unity/
Other
720 stars 213 forks source link

androidx support for mapbox unity #1438

Open nilsk123 opened 5 years ago

nilsk123 commented 5 years ago

Can 'androidx' support for mapbox unity be looked into?

https://developer.android.com/jetpack/androidx

Its been almost a year since the Unity package was updated and some parts are becoming hard to maintain, especially the mapbox's reliance on the outdated support compat libraries.

Our project also includes plugins like facebook and firebase, and in order to update those we need to also start using the androidx system but it's not supported by mapbox.

I know this has been asked before, but can we please at least get an indication as to wether Unity is even going to be supported anymore? Is there a timeline/roadmap?

Tasta commented 5 years ago

Hey mate,

Had the same problem, same project setup with Facebook, Firebase and MapBox. Killed my spirit & my soul for a couple of hours.

I fixed it by hacking my way through MapBox sources.

  1. Get jetifier: https://developer.android.com/studio/command-line/jetifier
  2. Run Mapbox/Core/Plugins/Android/mapbox-android-telemetry-2-1-0.aar through it.
  3. Run Mapbox/Unity/Location/Plugins/Android/com.mapbox.android.unity-debug.aar through it.
  4. Enable Jetifier in Unity too inside Google Jar Resolver.
  5. Resume to actually working for your app

If it doesn't work from the start, unpack the *.aar files and use http://java-decompiler.github.io/ on the classes.dex file to decompile the java code. You can manually check which class paths are used. Obviously, androidx ones are the ones you want, so make sure they're there.

Cheers!

nilsk123 commented 4 years ago

thanks a lot! gonna try this

nilsk123 commented 4 years ago

worked just fine, the telemetry aar has been renamed to libtelemetry-full-release