Android Question Google Maps crashes app

cwt

Active Member
Licensed User
Longtime User
When my app attempts to display a Google Map it crashes with this from the log:

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/0000002b/MapsDynamite.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/0000002b/MapsDynamite.apk!/lib/arm64-v8a, /system/lib64]]

I did a lot of updating of my app a couple of months ago with updating the Android version, etc. and thought all was well but apparently not.

I am using the Google Maps library v2.0 and B4A version 9.30

Not sure where to begin looking - any help will be appreciated.
 

cwt

Active Member
Licensed User
Longtime User
I am not sure this is a permission problem. I implemented the runtime permission code indicated in your link for PERMISSION_FINE_LOCATION and still get the crash when the map is opened.

The log shows this in debug mode:

** Activity (googlemaps) Resume **
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion;
at bs.b:)com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-0):2)
at br.a:)com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-0):3)
at bt.a:)com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-0):20)
at com.google.maps.api.android.lib6.drd.ak.a:)com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-0):6)
at ax.a:)com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-0):13)
at ax.run:)com.google.android.gms.dynamite_mapsdynamite@[email protected] (100400-0):49)
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/0000002b/MapsDynamite.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/0000002b/MapsDynamite.apk!/lib/arm64-v8a, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at w.loadClass:)com.google.android.gms.dynamite_dynamiteloader@[email protected] (100400-0):16)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 6 more
** Activity (googlemaps) Pause, UserClosed = true **

Does the log info above help pinpoint this?
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
By the way, I did not put the SmileyFace in the text above - the SmileyFace was substituted for ":)"

Substituted for a "(" followed by a ":"
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
Erel,

Thanks for the help - I was missing this code in the Manifest:

B4X:
AddApplicationText(
<uses-library
      android:name="org.apache.http.legacy"
      android:required="false" />
)
 
Upvote 0
Top