Reputation: 592
I am following the documentation to add the MapLiber library to a new Android project https://maplibre.org/maplibre-native/docs/book/android/getting-started-guide.html
The Gradle sync seems to be working ok, but I get this error when trying to import the package
import org.maplibre.android.Maplibre
Unresolved reference: maplibre
this is how I added the dependency
implementation 'org.maplibre.gl:android-sdk:10.0.2'
What am i doing wrong?
Upvotes: 5
Views: 601
Reputation: 479
As the other answer notes, there is an error in the documentation. Where it says
import org.maplibre.android.Maplibre
it should say
import org.maplibre.android.MapLibre
(note the capital "L")
The documentation also mentions
import org.maplibre.android.testapp.R
which you'll probably need to remove. Other parts of the documentation could benefit from a bit more detail, but this should get you going.
Upvotes: 0
Reputation: 422
There is a problem with the documentation. You can init like that:
import com.mapbox.mapboxsdk.Mapbox;
Mapbox.getInstance(this);
Upvotes: 4