Closed MalcolmScoffable closed 4 years ago
Ok, so managed to fix this by including the following in my build.gradle:
repositories {
...
google()
...
}
...
dependencies {
...
compile('androidx.annotation:annotation:1.0.0')
....
}
So, the main issue seems to have been the that androidx.annotation lib wasn't being found from the standard Maven repo... and I needed to include the Google repos. This is all fine, but there was nothing in the documentation to indicate this. The documentation also suggests that this library doesn't rely on any Android libraries - which is clearly not the case. Perhaps this should be updated. Not sure if this is correct though? Would be good to get feedback on this. I don't mind updating the documentation but want to make sure I am correct in thinking the above, and also aware that using this from Kotlin in a Spring application isn't really that normal....
Perhaps this should be updated.
Yes, we should clarify that we don't rely on any Android SDK APIs but do use AndroidX annotations.
using this from Kotlin in a Spring application isn't really that normal
That is a totally valid use-case!
Closing because https://docs.mapbox.com/android/java/overview/ has been updated to mention AndroidX annotations. @MalcolmScoffable's project is working. I don't think there are other actionable items at this point, but if anyone disagrees, please re-open and comment.
Thanks for the ticket, @MalcolmScoffable.
Same issue.
I'm attempting to use the latest version of this library for geocoding in a Kotlin based Spring Boot application. I can import the package 'mapbox-sdk-services' fine via Gradle (and Maven), however my application won't compile due to the following error:
It appears as if there is perhaps some dependency on Android libraries in here, as far as I know it shouldn't really matter that I'm using this in a Kotlin based application, rather than pure Java. Has anyone come across this issue, or am I perhaps misunderstanding something from the documentation. I am going to try older version of the library, but am a bit stuck with this one now.
Any help with this would be really appreciated.