gpt4 book ai didi

android - 谷歌地图错误日志 :api key not found

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:57:27 26 4
gpt4 key购买 nike

我创建了安卓 key 。我在我的代码中使用 key

<meta-data android:name="com.google.androoid.maps.v2.API_KEY"
android:value="AIzaSyDlSZf-YTqh_rBLyzjzB6VanBVm4xk6VvI"/>

但是android 找不到api key 。我不知道这个错误原因。

01-15 15:12:33.526: E/AndroidRuntime(28834): Caused by: java.lang.RuntimeException: API key not found. Check that is in the element of AndroidManifest.xml

list 文件 '

<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="17" />
<permission
android:name="com.example.googlemap.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission
android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />


<!--
The following two permissions are not required to use
Google Maps Android API v2, but are recommended.
-->


<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.googlemap.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

</activity>
<meta-data android:value="4030500"
android:name="com.google.android.gms.version"/>
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<meta-data android:name="com.google.androoid.maps.v2.API_KEY"
android:value="AIzaSyDlSZf-YTqh_rBLyzjzB6VanBVm4xk6VvI"/>

</application>

</manifest>
'

最佳答案

改变这个

 <meta-data android:name="com.google.androoid.maps.v2.API_KEY"   
android:value="AIzaSyDlSZf-YTqh_rBLyzjzB6VanBVm4xk6VvI"/>
// androoid should be android

<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDlSZf-YTqh_rBLyzjzB6VanBVm4xk6VvI"/>

并移除

<meta-data android:value="4030500" 
android:name="com.google.android.gms.version"/>

同时清理并构建项目。如果它不起作用,请尝试再次重新生成 api key

关于android - 谷歌地图错误日志 :api key not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21130468/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com