I have a project in Android and I want to add MapView to it.
I did the following:
- Downloaded the Google APIs revision 3.
- Added the maps.jar library to my project
- Added the MapView to an activity
- Created new Virtual Device with target the Google APIs (not the normal target Android 1.5)
- Started the project
When I try to reach the activity with the map view, I get
………………..
12-16 20:57:44.620:
ERROR/AndroidRuntime(792): Caused by:
java.lang.IllegalAccessError:
cross-loader access from pre-verified
class12-16 20:57:44.620:
ERROR/AndroidRuntime(792): at
dalvik.system.DexFile.defineClass(Native
Method)12-16 20:57:44.620:
ERROR/AndroidRuntime(792): at
dalvik.system.DexFile.loadClass(DexFile.java:193)…………
What am I doing wrong?
If using Eclipse, make sure that you don’t have multiple references to the maps.jar on your Project Build Path. This includes any direct reference to the maps.jar, or implicit reference through the Google APIs Library (Google APIs [Android 1.5]). In fact, only having the Google APIs Library on your Project Build Path should be sufficient.
http://andmobidev.blogspot.com