【发布时间】:2021-07-16 11:03:06
【问题描述】:
我第一次安装并正确配置它时使用react-native-maps,但是当我运行应用程序时显示以下错误:
API key not found. Chech that <Meta-data android:name:".." ...... is in the <application> element of AndroidManifest.xml
我尝试清理缓存,清理 gradlew,但没有解决我的问题。
AndroidManifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dateapp">
<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|uiMode"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="com.google.android.geo.xxxxxxxxxx"
android:value="xxxxxxxxxx"/>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
有人知道我错过了什么吗?
【问题讨论】:
标签: javascript reactjs react-native api-key react-native-maps