I am fairly new to android app development. Today i tried to implement a map inn my app, and cannot make it work. I even tried to make a new app with the default map activity, which crashes instantly.
This is the error I am getting:
--------- beginning of crash
2018-12-25 23:03:24.440 8401-8428/? E/AndroidRuntime: FATAL EXCEPTION: Thread-5
Process: com.example.krist.maptest, PID: 8401
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion;
at ez.b(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-223214910):3)
at ey.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-223214910):3)
at fa.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-223214910):15)
at com.google.maps.api.android.lib6.drd.al.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-223214910):6)
at ed.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-223214910):21)
at ed.run(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-223214910):8)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.ProtocolVersion" on path: DexPathList[[zip file "/data/user_de/0/com.google.android.gms/app_chimera/m/00000016/MapsDynamite.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/00000016/MapsDynamite.apk!/lib/arm64-v8a, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at ad.loadClass(:com.google.android.gms.dynamite_dynamiteloader@[email protected] (100400-223214910):4)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at ez.b(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-223214910):3)
at ey.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-223214910):3)
at fa.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-223214910):15)
at com.google.maps.api.android.lib6.drd.al.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-223214910):6)
at ed.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-223214910):21)
at ed.run(:com.google.android.gms.dynamite_mapsdynamite@[email protected]
(100400-223214910):8)
I am running on a Pixel 3XL with the latest updates. Any ideas what the issue might be? Thanks.
Check if dependencies are set up correctly. Play services and gmaps versions should not vary. Enable multidexing in your build. add this line in dependencies: implementation 'com.android.support:multidex:1.0.3' and make these changes in defaultConfig: android { defaultConfig { ...
} And sync project.