package exam.healthroid;
import java.util.List;
import android.content.Context;
import android.os.Bundle;
import android.widget.Toast;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.MyLocationOverlay;
import com.google.android.maps.Overlay;
public class Healthroid extends MapActivity {
MapView mMap;
MyLocationOverlay2 mLocation;
protected boolean isRouteDisplayed() {
return false;
}
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mMap = (MapView)findViewById(R.id.mapview);
MapController mapControl = mMap.getController();
mapControl.setZoom(13);
mMap.setBuiltInZoomControls(true);
GeoPoint pt = new GeoPoint(37881311, 127729968);
mapControl.setCenter(pt);
mLocation = new MyLocationOverlay2(this, mMap);
List<Overlay> overlays = mMap.getOverlays();
overlays.add(mLocation);
mLocation.runOnFirstFix(new Runnable() {
public void run() {
mMap.getController().animateTo(mLocation.getMyLocation());
}
});
}
public void onResume() {
super.onResume();
mLocation.enableMyLocation();
mLocation.enableCompass();
}
public void onPause() {
super.onPause();
mLocation.disableMyLocation();
mLocation.disableCompass();
}
class MyLocationOverlay2 extends MyLocationOverlay {
public MyLocationOverlay2(Context context, MapView mapView) {
super(context, mapView);
}
protected boolean dispatchTap() {
Toast.makeText(Healthroid.this, "여기가 현재 위치입니다.",
Toast.LENGTH_SHORT).show();
return false;
}
}
}
여기까지 자바코드 입니다.
밑에는 로그캣이구요..
05-24 12:50:38.308: ERROR/BatteryService(59): usbOnlinePath not found
05-24 12:50:38.308: ERROR/BatteryService(59): batteryVoltagePath not found
05-24 12:50:38.308: ERROR/BatteryService(59): batteryTemperaturePath not found
05-24 12:50:38.329: ERROR/SurfaceFlinger(59): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
05-24 12:50:45.028: ERROR/EventHub(59): could not get driver version for /dev/input/mouse0, Not a typewriter
05-24 12:50:45.028: ERROR/EventHub(59): could not get driver version for /dev/input/mice, Not a typewriter
05-24 12:50:45.238: ERROR/System(59): Failure starting core service
05-24 12:50:45.238: ERROR/System(59): java.lang.SecurityException
05-24 12:50:45.238: ERROR/System(59): at android.os.BinderProxy.transact(Native Method)
05-24 12:50:45.238: ERROR/System(59): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
05-24 12:50:45.238: ERROR/System(59): at android.os.ServiceManager.addService(ServiceManager.java:72)
05-24 12:50:45.238: ERROR/System(59): at com.android.server.ServerThread.run(SystemServer.java:184)
05-24 12:50:46.288: ERROR/SoundPool(59): error loading /system/media/audio/ui/Effect_Tick.ogg
05-24 12:50:46.288: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressStandard.ogg
05-24 12:50:46.288: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressSpacebar.ogg
05-24 12:50:46.288: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressDelete.ogg
05-24 12:50:46.288: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressReturn.ogg
05-24 12:50:48.348: ERROR/ThrottleService(59): Could not open GPS configuration file /etc/gps.conf
05-24 12:50:49.428: ERROR/logwrapper(144): executing /system/bin/tc failed: No such file or directory
05-24 12:50:49.498: ERROR/logwrapper(146): executing /system/bin/tc failed: No such file or directory
05-24 12:50:49.578: ERROR/logwrapper(148): executing /system/bin/tc failed: No such file or directory
05-24 12:51:00.481: ERROR/HierarchicalStateMachine(59): TetherMaster - unhandledMessage: msg.what=3
05-24 12:51:26.692: ERROR/AndroidRuntime(296): FATAL EXCEPTION: main
05-24 12:51:26.692: ERROR/AndroidRuntime(296): java.lang.RuntimeException: Unable to instantiate application exam.healthroid.Healthroid: java.lang.ClassNotFoundException: exam.healthroid.Healthroid in loader dalvik.system.PathClassLoader[/data/app/exam.healthroid-1.apk]
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:649)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4232)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at android.app.ActivityThread.access$3000(ActivityThread.java:125)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at android.os.Handler.dispatchMessage(Handler.java:99)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at android.os.Looper.loop(Looper.java:123)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at android.app.ActivityThread.main(ActivityThread.java:4627)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at java.lang.reflect.Method.invokeNative(Native Method)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at java.lang.reflect.Method.invoke(Method.java:521)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at dalvik.system.NativeStart.main(Native Method)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): Caused by: java.lang.ClassNotFoundException: exam.healthroid.Healthroid in loader dalvik.system.PathClassLoader[/data/app/exam.healthroid-1.apk]
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at android.app.Instrumentation.newApplication(Instrumentation.java:942)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:644)
05-24 12:51:26.692: ERROR/AndroidRuntime(296): ... 11 more
로그캣을 아무리 봐도 왜 실행이 안되는지 모르겠습니다 ㅜ;
고수분들의 조언 부탁드립니다!




아 소스에선 에러가 나지 않습니다. 에뮬에서 구동시 에러나네요..ㅜ