How to resolve WARNING - for Google map version 1 not available in Android 11
Asked Answered
R

3

14

App bundles or APKs in this release use version 1 of the Google Maps SDK, which is not available on Android 11 or higher. Remove this dependency from your app. Google Play may remove support for version 1 of the Google Maps SDK in the future.

We have already migrated to Maps API V2, hence functionality wise there should not be any issues.

Runkel answered 13/8, 2020 at 12:20 Comment(1)
I have found some dead code having MapView code , that might be cause of this warning .Runkel
A
10

I had the same issue even though we have been using latest Maps SDK for Android for years. I had to remove this entry from AndroidManifest.xml

<uses-library android:name="com.google.android.maps" />
Antitoxic answered 17/8, 2020 at 16:15 Comment(3)
Removing this will crash the app when loading the mapDwanadwane
@Dwanadwane actually this resolved the problem for me.Askja
incredible :D was checking gradle imports 100 times, but this was simple and worked.Buttonball
F
5

In the app's Manifest:

Remove:

<uses-library android:name="com.google.android.maps" />

Add these lines above the <application ... />:

 <!--
    Android 11 package visibility changes require that apps specify which
    set of other packages on the device that they can access. Since this
    sample uses Google Maps, specifying the Google Maps package name is
    required so that the buttons on the Map toolbar launch the Google Maps
    app.
-->
<queries>
    <package android:name="com.google.android.apps.maps" />
</queries>

Found those on the official Google's code sample: https://github.com/googlemaps/android-samples/blob/main/ApiDemos/java/app/src/main/AndroidManifest.xml

Fitted answered 24/2, 2021 at 6:47 Comment(1)
As of Google Play service 17.0.1 even those lines can be removed. See developers.google.com/maps/documentation/android-sdk/…Miliaria
W
1

I'm facing the same 'problem'. But I think it's a false positive. I removed everything from v1 and used v2 for a long time now. Probably best to create a ticket at Google for this.

Whimsey answered 10/9, 2020 at 12:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.