1

2 行目でプログラムがクラッシュします。

mySensorManager = SensorManagerSimulator.getSystemService(this,Context.SENSOR_SERVICE);
mySensorManager.connectSimulator();

これは私がlogcatで見るものです:

10-01 06:28:17.479: I/Process(2009): Sending signal. PID: 2009 SIG: 9
10-01 06:28:18.519: I/Hardware(2040): Starting connection...
10-01 06:28:18.609: I/Hardware(2040): Connecting to 10.0.2.2 : 8010
10-01 06:28:18.630: D/AndroidRuntime(2040): Shutting down VM
10-01 06:28:18.630: W/dalvikvm(2040): threadid=1: thread exiting with uncaught     exception (group=0x414c4700)
10-01 06:28:18.661: E/AndroidRuntime(2040): FATAL EXCEPTION: main
10-01 06:28:18.661: E/AndroidRuntime(2040): java.lang.RuntimeException: Unable to start     activity ComponentInfo{com.example.sensortest2/com.example.sensortest2.MainActivity}:     android.os.NetworkOnMainThreadException
10-01 06:28:18.661: E/AndroidRuntime(2040):     at     android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
10-01 06:28:18.661: E/AndroidRuntime(2040):     at     android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
10-01 06:28:18.661: E/AndroidRuntime(2040):     at     android.app.ActivityThread.access$600(ActivityThread.java:141)
10-01 06:28:18.661: E/AndroidRuntime(2040):     at     android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
10-01 06:28:18.661: E/AndroidRuntime(2040):     at     android.os.Handler.dispatchMessage(Handler.java:99)
10-01 06:28:18.661: E/AndroidRuntime(2040):     at     android.os.Looper.loop(Looper.java:137)
10-01 06:28:18.661: E/AndroidRuntime(2040):     at     android.app.ActivityThread.main(ActivityThread.java:5103)

等々...

この混乱の問題は何ですか?それについて何ができますか???

4

0 に答える 0