App crashes when running maps activity

前端 未结 3 1853
[愿得一人]
[愿得一人] 2020-12-11 01:38

My projects Map activity is not working
I just pasted the api key in place google_maps_api.xml and clicked run

Logcat:

E/Andr

3条回答
  •  隐瞒了意图╮
    2020-12-11 01:45

    I've found another solution at Android Google maps java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion

    Just add this in your manifest:

    
    

    Update:

    Starting from Google Maps SDK version 16.1.0 you can skip adding the solution above as the tag has been added to the AndroidManifest of the maps library.

    https://developers.google.com/maps/documentation/android-sdk/releases#2019-02-06

    Added the following declaration to the AndroidManifest.xml to support the Apache HTTP client on Android P and above. After updating to com.google.android.gms:play-services-maps:16.1.0 you can remove this line from your own AndroidManifest.xml. (Issue 117591497)

提交回复
热议问题