Dependency between mapbox-android-ui and mapbox-android-sdk
Platform: Android Mapbox SDK version: 5.1.0
Steps to trigger behavior
It appears there is some dependency between versions of mapbox-android-ui and mapbox-android-sdk that manifested in my case as a proguard issue and resultant build failure:
- Create a project with
mapbox-android-ui< 2.1.3 (I used 2.0.0) andmapbox-android-sdk - Supply
minifyEnabled true - Attempt to build
Expected behavior
Proguard should not throw any warnings or errors.
Actual behavior
Proguard will show the below warning, and oddly no amount of proguard rules seems to fix it. I wasn't able to dig too much further, but upon updating mapbox-android-ui to 2.1.3 the issue was resolved. It would be great to document the dependency between these libs if one exists (it may be there and I overlooked it.)
Warning: com.mapbox.mapboxsdk.location.LocationSource: can't find referenced method 'android.location.Location getLastLocation()' in program class com.mapzen.android.lost.api.FusedLocationProviderApi
Warning: com.mapbox.mapboxsdk.location.LocationSource: can't find referenced method 'void requestLocationUpdates(com.mapzen.android.lost.api.LocationRequest,com.mapzen.android.lost.api.LocationListener)' in program class com.mapzen.android.lost.api.FusedLocationProviderApi
Warning: com.mapbox.mapboxsdk.location.LocationSource: can't find referenced method 'void removeLocationUpdates(com.mapzen.android.lost.api.LocationListener)' in program class com.mapzen.android.lost.api.FusedLocationProviderApi
Warning: there were 3 unresolved references to program class members.
Your input classes appear to be inconsistent.
You may need to recompile the code.
The issue shown above is due to a LOST dependency version mismatch. (with the latest SDK we shipped an older version of LOST. This one is getting stripped out with a newer version from the mapbox-android-ui depedency. You can look into this kind of changes with ./gradlew :module_name:dependencies and you will see that the LOST version that shipped with the SDK (v1.1.1) has been stripped. If you aren't able to update the mapbox-android-ui, you can always exclude the LOST module from that dependency. A bit more information on the topic in https://github.com/mapbox/mapbox-gl-native/issues/9408.
Closing as this is not actionable for us. Users will have to patch this from their end.