Issue
I need to use maps on running in a physical Android device, how do i do that?
I do not want to use the AVD for debugging it.
By the way i get the same error on AVD so please help? here is my code
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:apiKey="0enZtoViiB7JtEUxmyjwYWuw0Hz8pdTqNNWtBjQ"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true" />
AndroidManifest.xml
<uses-library android:name="com.google.android.maps" />
Activity:
public class AroundMeActivity extends MapActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.qa_layout_activity);
MapView mapView = (MapView) findViewById(R.id.map);
mapView.setBuiltInZoomControls(true);
}
@Override
protected boolean isRouteDisplayed() {
return false;
}
}
STACKTRACE:
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at dalvik.system.DexFile.defineClass(Native Method)
at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:207)
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:200)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
Solution
This Exception usually means that you have symbols collision in your project.
Make sure that you included maps.jar only once in the project.
Answered By - ofirbt
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.