Google Maps crashing on Android Pie

后端 未结 3 1602
抹茶落季
抹茶落季 2021-01-04 09:25

I am testing Google Map on Google Pixel running the latest version of Android Pie.

Caused by java.lang.ClassNotFoundException
Didn\'t find class \"org.apach         


        
相关标签:
3条回答
  • 2021-01-04 09:50

    This error occurs on Android 9.0. Add the below code in the <application> element of manifest

    <uses-library
      android:name="org.apache.http.legacy"
      android:required="false" />
    

    Refer to Specify requirement for Apache HTTP Legacy library docs.

    0 讨论(0)
  • Google map is not property supported android 9+. Use the following code in your manifest file. it will work.

     <uses-library
                android:name="org.apache.http.legacy"
                android:required="false" />
    
    0 讨论(0)
  • 2021-01-04 10:07

    Thanks to @Anubhav Gupta, you can also update in build.gradle:

    implementation "com.google.android.gms:play-services-base:16.1.0"
    

    But this can brake a compatibility with Android 4, see App is having trouble with Google Play Services. Please try again.

    0 讨论(0)
提交回复
热议问题