Fatal Exception: java.lang.NoClassDefFoundError Failed resolution of: Ltimber/log/Timber;
I am using mapbox autocomplete feature but on some device app crash
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:7.3.0' implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-places:0.6.0' implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v7:0.6.0' implementation 'com.jakewharton.timber:timber:4.7.1'
Fatal Exception: java.lang.NoClassDefFoundError Failed resolution of: Ltimber/log/Timber; com.mapbox.mapboxsdk.plugins.places.autocomplete.viewmodel.PlaceAutocompleteViewModel.onFailure (PlaceAutocompleteViewModel.java:115) retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$2.run (ExecutorCallAdapterFactory.java:79) android.os.Handler.handleCallback (Handler.java:743) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:712) Caused by java.lang.ClassNotFoundException Didn't find class "timber.log.Timber" on path: DexPathList[[zip file "/data/app/com.ameerhamza.tourly.pakistan-1/base.apk"],nativeLibraryDirectories=[/data/app/com.ameerhamza.tourly.pakistan-1/lib/arm64, /data/app/com.ameerhamza.tourly.pakistan-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]
If you have a general question/issue about implementing Mapbox, please first:
• search for more information on our Android documentation site – https://www.mapbox.com/android-docs/
• search among tickets with the "Android" label in the Mapbox GL-native repository – https://github.com/mapbox/mapbox-gl-native/issues?q=is%3Aissue+is%3Aopen+label%3AAndroid
• search for your issue on Stack Overflow – https://stackoverflow.com/search?tab=newest&q=Mapbox%20%5bandroid%5d
Please contact Mapbox support via https://https://www.mapbox.com/contact/support/#products if you still need assistance or have questions after searching in the resources listed above. -->
Hey @ameerhamza6733 ,
What device did the crash happen on? What Android API?
Are you using multidex in your project?
See https://github.com/JakeWharton/timber/issues/112