Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Adding MapLibre to a new Android project is not working

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

this is how I added the dependency

implementation 'org.maplibre.gl:android-sdk:10.0.2'

What am i doing wrong?

>Solution :

There is a problem on documentation. You can init like that:

import com.mapbox.mapboxsdk.Mapbox;

       Mapbox.getInstance(this);

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading