You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
I'm unable to build an APK with ProGuard enabled targeting Android O SDK version (targetSdkVersion 26).
Information: Gradle tasks [:app:assembleRelease]
Warning: org.osmdroid.tileprovider.modules.NetworkAvailabliltyCheck: can't find referenced method 'boolean requestRouteToHost(int,int)' in library class android.net.ConnectivityManager
Warning:there were 1 unresolved references to library class members.
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> Job failed, see logs for details
The text was updated successfully, but these errors were encountered:
Apparently, ConnectivityManager.requestRouteToHost was *removed* from
the source code in API level 26. This might cause problems on Android O,
and adding a dontwarn to ProGuard isn't really the ideal solution.
Signed-off-by: Daniele Ricci <firstname.lastname@example.org>
Well, the -dontwarn really is a dirty work around. requestRouteToHost(int,int) has been removed in API 26. It's being called in NetworkAvailabliltyCheck.getRouteToPathExists(final int hostAddress), which doesn't seem to be used anywhere. So either we should come up with a replacement for requestRouteToHost(int,int) there or just remove method getRouteToPathExists from NetworkAvailabliltyCheck and INetworkAvailablityCheck.