在做android的地图验证程序时,LogCat出现如题错误,程序可以正常运行,apiKey也正确
解决方案 »
- 最近想写一个服务器端程序,接收上传apk,然后解析它得到包名等信息,像机锋网开发者那样,请问解析的过程应该怎么实现呢
- AudioTrack::getMinFrameCount代码理解?
- 关于数据库更新的问题
- 怎么将一张图片分享到类似人人网这样的客户端上
- new Intent(Intent.ACTION_VIEW);
- 请教一个关于EditText的问题
- android最全的实战经验总结+基础总结
- listView怎么添加横向滚动
- android静默卸载怎么实现?
- 用正则表达式匹配IP地址的一些问题
- 由于selector xml文件名导致图片不显示的问题
- android 如何获取自己的 mac地址 就是自己蓝牙的 mac地址 求秒
检查在AndroidManifest.xml里面是否加入
<uses-permission android:name="android.permission.INTERNET" />
<uses-library android:name="com.google.android.maps" />如果在模拟器中出现这个问题,关闭模拟器后重新开;
如果在手机中出现此类问题,卸载应用后重新安装。
我的API Key刚刚申请的,Manifest中该加入的权限也加入了,然后重启了eclipse 和模拟器,但是还是出现这个错误。
可是程序是可以运行的,好像这个错误没有影响到程序
这是为什么呢
import com.google.android.maps.MapView;import android.os.Bundle;
public class MainActivity extends MapActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
MapView mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
} @Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.activity3_06"
android:versionCode="1"
android:versionName="1.0" > <uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="10" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<uses-library android:name="com.google.android.maps" />
<activity
android:name="com.example.activity3_06.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>
</application>
</manifest>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="AIzaSyBZ7QIPfb7SMWmcgi2XwZwynRx6lhSgtHU"
/></RelativeLayout>