Mapview in MapActivity Class not found

夙愿已清 提交于 2019-12-05 07:52:34
<uses-library android:name="com.google.android.maps" />

must be within <application> </application>

You said you tried that, but how you currently have it, it wont't work by any chance, so change that first.

Looks like maps.jar is not included in your project folder.

First of all put following line as child of application in your manifest file

<uses-library android:name="com.google.android.maps" />

After that right click on your project folder -> Properties -> Android -> In Project Build Target check whether checkbox has been selected for Google API only. if not check it. this will add maps.jar in your project and then your project will understand what is MapActivity.. :)

Did you download the Google API add-on for the SDK version you are using?

The Google APIs are not packaged with the standard SDK. You have to download them using the AVD Manager.

Edit - it says to add the <uses-library ... /> as a child of the <application> tag.

This means to put it on the line after the <application> tag but before </application>.

I had the exact same issue until I created a new android virtual device.

Make sure that you create a virtual android device that also has the Google APIs in it also.. just having the APIs in the SDK and setting the run target to a version with Google APIs included isn't enough, you also need to make sure your emulator virtual device has the Google APIs from the Android SDK installed as well.

claudio_otto

I have fixed that error installing eclipse in another location and installing Android plugins (ADT). That worked for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!