Trying to make a signed apk using Build-> Generate Signed APK ... But it does not work. The reason for this is the error:

enter image description here

And swears in the manifest, which is generated during the build itself, that is, not mostly.

In the main manifesto, of course, everything is spelled out and works great.

<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="@string/google_maps_key" /> 

The reason for the error is not clear. Who faced?

  • Well, in general, it swears that there are no resources ... Exactly, there is such a resource @string/google_maps_key and it is in values and not in values-XXX . And by the way, why write <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> and so it is in aar which is usually used. - pavel
  • Yes, it was in the values ​​that I checked everything a hundred times already .. If you just knock the project, then everything works fine. - Android Android
  • Yes, sign through the console then :) I understand that clean did not help either. - pavel
  • clean / rebuld / reboot company / dancing with tambourines / without tambourines didn’t help at all =) haven’t tried the console yet - Android Android

1 answer 1

Most likely @string/google_maps_key" refers to a directory that does not fall into the release, for example in the debug directory ... Add a link to the resource in the project directory main or release

enter image description here

  • Here it is interesting, now I will try - Android Android
  • Thousand devils! It worked! Thank you =) - Android Android
  • I knew!!! I knew!!!! You 're welcome ;) - Chaynik