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="***"
/>
and manifestfile is this
Insert this on your xml declaration of the MapView
Did you extend the main class as MapActivity?
I had the same problem and about 3 hours of searching this is what I did to fix it, All in the manifest.
1) In my manifest this code was not in the right place
it should be here, under
like this
2) I lost a period somewhere in my manifest
3) I didn't specify min sdk version which goes under
code:
4) to get the map to work through eclipse in debug mode follow these directions in your cmd or terminal http://www.buzztouch.com/resources/Obtaining_a_Google_Maps_API_Key_v1.0.pdf
I hope this helps someone
I know the following wasn't the error of the original questioner - but since my problem led to the same error message, I thought I might as well add it in case someone in the future runs into it.
I checked all the other good hints, but none of them were missing in my project.
What finally solved the problem for me, was that I forgot to declar the MapView in the layout including the full package name. Neither Eclipse nor Lint did tell me about this:
I had this problem and solved it by the following 2 steps:
1) Put the following line in the application (important) element of AndroidManifest.xml file.
2) extend MapActivity instead of Activity.
enjoy!
I had the problem. Just extend MapActivity instead of Activity.