Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Impossible to configure geolocation API KEY on Android

When I try to run Android adding the api key I get this error on my screen :

API key not found. Check that

Please find below my manifest file .

I have tried running tutorial from scratch but does not work...

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.rncourse">

    <uses-permission android:name="android.permission.INTERNET" />

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:allowBackup="false"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:windowSoftInputMode="adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
      <meta-data android:name="com.google.android.geo.IeuySyCT-XXXXXXXXXX" android:value="IeuySyCT-XXXXXXXXXX"/>
    </application>

</manifest>
like image 743
Raoul Barmat Avatar asked Aug 18 '20 08:08

Raoul Barmat


1 Answers

I found the answer. If it helps anyone else, please find below the corrected line

 android:name="com.google.android.geo.API_KEY"
 android:value="IeuySyCT-XXXXXXXX"/>

The API_KEY is meant to be the name of the variable we specify in config. Here it is the API_KEY to keep literal

like image 127
Raoul Barmat Avatar answered Oct 21 '22 04:10

Raoul Barmat