2

I have added mapbox sdk to existing android project via direct download (https://docs.mapbox.com/android/maps/overview/#add-the-dependency)

I have added dependancy to build.gradle file like below.

implementation project(':mapbox-android-sdk-9.3.0')

After that i have changed my source code using it and it was complied successfully and , but in runtime i got below exception.

 Caused by: java.lang.ClassNotFoundException: Didn't find class "com.mapbox.android.telemetry.MapboxTelemetry" on path: DexPathList[[zip file "/data/app/com.xxxx.yyyy-LPdA94f71sQIsIW4AiNNZw==/base.apk"],nativeLibraryDirectories=[/data/app/com.xxxx.yyyy-LPdA94f71sQIsIW4AiNNZw==/lib/arm64, /system/lib64, /vendor/lib64, /product/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)

error was throwing by below line

Mapbox.getInstance(this.getActivity(), getString(R.string.mapbox_access_token));

Appreciate someone can help me to resolve this issue, thanks lot of your comments and feedback.

2 Answers 2

1

I think, direct download process is not working and it asked many dependencies and after adding all of them, it asked libmapbox-gl.so , so this process is not working properly.

So i followed, map sdk adding via maven repository its working without any issue and we only need to create secret token first according to given steps. Please, follow the Maven steps (first tab) https://docs.mapbox.com/android/maps/overview/#add-the-dependency

Sign up to request clarification or add additional context in comments.

Comments

0

What's username , its mapbox?

credentials {
            username = 'mapbox'
            // Use the secret token you stored in gradle.properties as the password
            password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
        }

2 Comments

Welcome to stackoverflow. Are you asking what the password is or was this your answer? To what question? Please add more context to your answers so everybody understands what you are telling.
@Van Halen yes, username is mapbox and password is generated token after login the mapbox account via ur credentials

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.