Hi All,
I am trying out to set map view from my class which is shown below but
when I run this app it gives me the class not found for my class which
is extending map activity and I am passing same to create the map
view.
Stack trace is as shown below
01-10 13:41:51.455: ERROR/AndroidRuntime(5654): Uncaught handler:
thread main exiting due to uncaught exception
01-10 13:41:51.593: ERROR/AndroidRuntime(5654):
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.tryst.mapexample/com.tryst.mapexample.MapExample}:
java.lang.ClassNotFoundException: com.tryst.mapexample.MapExample in
loader dalvik.system.pathclassloa...@43367128
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2068)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2156)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
android.os.Handler.dispatchMessage(Handler.java:88)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
android.os.Looper.loop(Looper.java:123)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
android.app.ActivityThread.main(ActivityThread.java:3742)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
java.lang.reflect.Method.invokeNative(Native Method)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
java.lang.reflect.Method.invoke(Method.java:515)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:739)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
dalvik.system.NativeStart.main(Native Method)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): Caused by:
java.lang.ClassNotFoundException: com.tryst.mapexample.MapExample in
loader dalvik.system.pathclassloa...@43367128
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:215)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
java.lang.ClassLoader.loadClass(ClassLoader.java:453)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
java.lang.ClassLoader.loadClass(ClassLoader.java:421)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
android.app.Instrumentation.newActivity(Instrumentation.java:1096)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2060)
01-10 13:41:51.593: ERROR/AndroidRuntime(5654): ... 11 more
public class TrystMap extends MapActivity {
/** Called when the activity is first created. */
private MapView myMapView;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
myMapView = new MapView(this,
"08fv48heZMWmo_I8z6vrAlroVu_aFZuLULzMV5w");
GeoPoint p = new GeoPoint((int) (40.689213 * 1000000),
(int) (-74.044558 * 1000000));
MapController mc = myMapView.getController();
mc.animateTo(p);
mc.setZoom(22);
setContentView(myMapView);
myMapView.setSatellite(true);
}
Any help in this regard is highly appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---