错误充气类com.google.android.maps.MapView [英] Error Inflating class com.google.android.maps.MapView
问题描述
我只是遵循一个简单的地图教程<一href="http://developer.android.com/resources/tutorials/views/hello-mapview.html">http://developer.android.com/resources/tutorials/views/hello-mapview.html但得到这个错误。我是新到Android我试图遵循所有提供在互联网上,但没有成功,还没有解决方案。请帮我。我的主要的.xml低于
i am just following a simple map tutorial http://developer.android.com/resources/tutorials/views/hello-mapview.html but getting this error . I am new to android i tried to follow all the solution provided over the internet but no success yet. Please help me. My main .xml is below
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="***"
/>
和manifestfile是这样
and manifestfile is this
推荐答案
我有这个问题,并通过以下两个步骤解决了这个问题:
I had this problem and solved it by the following 2 steps:
1)把下面一行在应用程序(AndroidManifest.xml文件中重要的)元素。
1) Put the following line in the application (important) element of AndroidManifest.xml file.
<uses-library android:name="com.google.android.maps" />
2)延伸,而不是活动MapActivity。
2) extend MapActivity instead of Activity.
享受!
这篇关于错误充气类com.google.android.maps.MapView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!