mapbox / mapbox-maps-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.
https://www.mapbox.com/mobile-maps-sdk
Other
475 stars 133 forks source link

MapboxSDKCommonInitializer - ClassNotFoundException #2202

Closed maheshordex closed 1 year ago

maheshordex commented 1 year ago

Environment

implementation ('com.mapbox.maps:android:11.0.0-beta.6'){
        exclude group: 'com.mapbox.common', module: 'common'
 }
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.42.6'
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.42.6'

Observed behavior and steps to reproduce

App crashing when launch app

Expected behavior

It should launch without crash

Notes / preliminary analysis

FATAL EXCEPTION: main
Process: com.xxxx.xxxx, PID: 10395
java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/mapbox/common/MapboxSDKCommonInitializer;
    at android.app.ActivityThread.installProvider(ActivityThread.java:7467)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:6973)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6744)
    at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2133)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7872)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: androidx.startup.StartupException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/mapbox/common/MapboxSDKCommonInitializer;
    at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:187)
    at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:239)
    at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:207)
    at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:49)
    at android.content.ContentProvider.attachInfo(ContentProvider.java:2451)
    at android.content.ContentProvider.attachInfo(ContentProvider.java:2421)
    at android.app.ActivityThread.installProvider(ActivityThread.java:7462)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:6973) 
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6744) 
    at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2133) 
    at android.os.Handler.dispatchMessage(Handler.java:106) 
    at android.os.Looper.loopOnce(Looper.java:201) 
    at android.os.Looper.loop(Looper.java:288) 
    at android.app.ActivityThread.main(ActivityThread.java:7872) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) 
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/mapbox/common/MapboxSDKCommonInitializer;
    at com.mapbox.maps.loader.MapboxMapsInitializer.dependencies(MapboxMapsInitializer.java:24)
    at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:168)
    at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:239) 
    at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:207) 
    at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:49) 
    at android.content.ContentProvider.attachInfo(ContentProvider.java:2451) 
    at android.content.ContentProvider.attachInfo(ContentProvider.java:2421) 
    at android.app.ActivityThread.installProvider(ActivityThread.java:7462) 
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:6973) 
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6744) 
    at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2133) 
    at android.os.Handler.dispatchMessage(Handler.java:106) 
    at android.os.Looper.loopOnce(Looper.java:201) 
    at android.os.Looper.loop(Looper.java:288) 
    at android.app.ActivityThread.main(ActivityThread.java:7872) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.mapbox.common.MapboxSDKCommonInitializer" on path: DexPathList[[zip file "/data/app/~~jrEpF30zgHjD3q0lQ5cLhA==/com.mach1services.provider-tR1GkVrff2q0KUKJ25-nCQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~jrEpF30zgHjD3q0lQ5cLhA==/com.mach1services.provider-tR1GkVrff2q0KUKJ25-nCQ==/lib/x86_64, /data/app/~~jrEpF30zgHjD3q0lQ5cLhA==/com.mach1services.provider-tR1GkVrff2q0KUKJ25-nCQ==/base.apk!/lib/x86_64, /system/lib64, /system_ext/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    at com.mapbox.maps.loader.MapboxMapsInitializer.dependencies(MapboxMapsInitializer.java:24) 
    at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:168) 
    at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:239) 
    at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:207) 
    at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:49) 
    at android.content.ContentProvider.attachInfo(ContentProvider.java:2451) 
    at android.content.ContentProvider.attachInfo(ContentProvider.java:2421) 
    at android.app.ActivityThread.installProvider(ActivityThread.java:7462) 
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:6973) 
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6744) 
    at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2133) 
    at android.os.Handler.dispatchMessage(Handler.java:106) 
    at android.os.Looper.loopOnce(Looper.java:201) 
    at android.os.Looper.loop(Looper.java:288) 
    at android.app.ActivityThread.main(ActivityThread.java:7872) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) 
maheshordex commented 1 year ago

@baleboy @abbottLane @G1lty @githubatbaronecloud

maheshordex commented 1 year ago

@vatolvan

maheshordex commented 1 year ago

close as already opened here https://github.com/mapbox/mapbox-maps-android/issues/2203