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
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.
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" />
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.