발생하내요.. 에러도 몇개 생기구요..
혹시 이 부분 컴파일 되는 소스를 가지신분 도움 바랍니다
wva225ua@naver.com
에러는.. 좀 많은데요.. 컴파일은 잘됩니다..
02-15 12:54:46.574: ERROR/vold(27): Error opening switch name path '/sys/class/switch/test2' (No such file or directory)
02-15 12:54:46.574: ERROR/vold(27): Error bootstrapping switch '/sys/class/switch/test2' (No such file or directory)
02-15 12:54:46.574: ERROR/vold(27): Error opening switch name path '/sys/class/switch/test' (No such file or directory)
02-15 12:54:46.574: ERROR/vold(27): Error bootstrapping switch '/sys/class/switch/test' (No such file or directory)
02-15 12:54:56.923: ERROR/BatteryService(53): usbOnlinePath not found
02-15 12:54:56.923: ERROR/BatteryService(53): batteryVoltagePath not found
02-15 12:54:56.935: ERROR/BatteryService(53): batteryTemperaturePath not found
02-15 12:54:56.945: ERROR/SurfaceFlinger(53): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
02-15 12:55:00.524: ERROR/EventHub(53): could not get driver version for /dev/input/mouse0, Not a typewriter
02-15 12:55:00.524: ERROR/EventHub(53): could not get driver version for /dev/input/mice, Not a typewriter
02-15 12:55:00.624: ERROR/System(53): Failure starting core service
02-15 12:55:00.624: ERROR/System(53): java.lang.SecurityException
02-15 12:55:00.624: ERROR/System(53): at android.os.BinderProxy.transact(Native Method)
02-15 12:55:00.624: ERROR/System(53): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
02-15 12:55:00.624: ERROR/System(53): at android.os.ServiceManager.addService(ServiceManager.java:72)
02-15 12:55:00.624: ERROR/System(53): at com.android.server.ServerThread.run(SystemServer.java:176)
02-15 12:55:00.644: ERROR/AndroidRuntime(53): Crash logging skipped, no checkin service
02-15 12:55:07.865: ERROR/ActivityThread(94): Failed to find provider info for android.server.checkin
02-15 12:55:09.315: ERROR/ActivityThread(94): Failed to find provider info for android.server.checkin
02-15 12:55:09.384: ERROR/ActivityThread(94): Failed to find provider info for android.server.checkin
02-15 12:55:12.454: ERROR/AndroidRuntime(121): ERROR: thread attach failed
02-15 12:55:14.534: ERROR/MediaPlayerService(31): Couldn't open fd for content://settings/system/notification_sound
02-15 12:55:14.534: ERROR/MediaPlayer(53): Unable to to create media player
02-15 12:55:17.995: ERROR/AndroidRuntime(184): ERROR: thread attach failed
02-15 12:55:18.704: ERROR/AndroidRuntime(221): Uncaught handler: thread main exiting due to uncaught exception
02-15 12:55:18.715: ERROR/AndroidRuntime(221): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ex.Gps/com.ex.Gps.Gps}: java.lang.SecurityException: Requires ACCESS_FINE_LOCATION permission
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2481)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2497)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1848)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at android.os.Handler.dispatchMessage(Handler.java:99)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at android.os.Looper.loop(Looper.java:123)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at android.app.ActivityThread.main(ActivityThread.java:4338)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at java.lang.reflect.Method.invokeNative(Native Method)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at java.lang.reflect.Method.invoke(Method.java:521)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at dalvik.system.NativeStart.main(Native Method)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): Caused by: java.lang.SecurityException: Requires ACCESS_FINE_LOCATION permission
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at android.os.Parcel.readException(Parcel.java:1218)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at android.os.Parcel.readException(Parcel.java:1206)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at android.location.ILocationManager$Stub$Proxy.getLastKnownLocation(ILocationManager.java:778)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at android.location.LocationManager.getLastKnownLocation(LocationManager.java:944)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at com.ex.Gps.Gps.onCreate(Gps.java:26)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2444)
02-15 12:55:18.715: ERROR/AndroidRuntime(221): ... 11 more
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"></uses-permission>
저도 이거 두개 추가해도 안되던데요..회색님...ㅜ.ㅜ
추가해있는상태입니다 ㅡ.ㅜ
[Gps Mainfest]
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ex.Gps"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"></uses-permission>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Gps"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="6" />
</manifest>
[main.xml]
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/lblLatitude"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Latitude:" />
<TextView
android:id="@+id/tvLatitude"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/lblLongitude"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Longitude:" />
<TextView
android:id="@+id/tvLongitude"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
[Gps.java]
package com.ex.Gps;
import android.app.Activity;
import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
public class Gps extends Activity {
private LocationManager lm;
private LocationListener locListenD;
public TextView tvLatitude;
public TextView tvLongitude;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
tvLatitude = (TextView)findViewById(R.id.tvLatitude);
tvLongitude = (TextView)findViewById(R.id.tvLongitude);
lm =(LocationManager)getSystemService(Context.LOCATION_SERVICE);
Location loc = lm.getLastKnownLocation("gps");
if(loc!=null) {
tvLatitude.setText(Double.toString(loc.getLatitude()));
tvLongitude.setText(Double.toString(loc.getLongitude()));
} else {
Log.d("location","location is null");
}
locListenD = new DispLocListener();
lm.requestLocationUpdates("gps", 30000L, 10.0f, locListenD);
}
private class DispLocListener implements LocationListener {
public void onLocationChanged(Location location) {
tvLatitude.setText(Double.toString(location.getLatitude()));
tvLongitude.setText(Double.toString(location.getLongitude()));
}
public void onProviderDisabled(String provider) {
}
public void onProviderEnabled(String provider) {
}
public void onStatusChanged(String provider, int status, Bundle extras) {
}
}
}