0

AndroidデバイスからPLC(S7-300)に接続するためにlibnodaveライブラリ(Java版)を使用しています。プロジェクトは Eclipse で作成します。接続しようとすると、接続のエラーが発生します。これはログファイルです:

10-31 11:37:48.378: E/SensorManager(31926): thread start
10-31 11:38:20.953: E/AndroidRuntime(31926): FATAL EXCEPTION: main
10-31 11:38:20.953: E/AndroidRuntime(31926): java.lang.IllegalStateException: Could not execute method of the activity
10-31 11:38:20.953: E/AndroidRuntime(31926):    at android.view.View$1.onClick(View.java:3704)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at android.view.View.performClick(View.java:4232)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at android.view.View$PerformClick.run(View.java:17298)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at android.os.Handler.handleCallback(Handler.java:615)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at android.os.Handler.dispatchMessage(Handler.java:92)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at android.os.Looper.loop(Looper.java:137)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at android.app.ActivityThread.main(ActivityThread.java:4921)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at java.lang.reflect.Method.invokeNative(Native Method)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at java.lang.reflect.Method.invoke(Method.java:511)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at dalvik.system.NativeStart.main(Native Method)
10-31 11:38:20.953: E/AndroidRuntime(31926): Caused by: java.lang.reflect.InvocationTargetException
10-31 11:38:20.953: E/AndroidRuntime(31926):    at java.lang.reflect.Method.invokeNative(Native Method)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at java.lang.reflect.Method.invoke(Method.java:511)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at android.view.View$1.onClick(View.java:3699)
10-31 11:38:20.953: E/AndroidRuntime(31926):    ... 11 more
10-31 11:38:20.953: E/AndroidRuntime(31926): Caused by: android.os.NetworkOnMainThreadException
10-31 11:38:20.953: E/AndroidRuntime(31926):    at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1118)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:84)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at libcore.io.IoBridge.connectErrno(IoBridge.java:127)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at libcore.io.IoBridge.connect(IoBridge.java:112)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at java.net.Socket.startupSocket(Socket.java:566)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at java.net.Socket.tryAllAddresses(Socket.java:127)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at java.net.Socket.<init>(Socket.java:177)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at java.net.Socket.<init>(Socket.java:149)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at nodave.DataIsoTCP.<init>(DataIsoTCP.java:29)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at nodave.DataIsoTCP.ConnectIsoTcp(DataIsoTCP.java:90)
10-31 11:38:20.953: E/AndroidRuntime(31926):    at com.example.s7nodavetest.MainActivity.makeConnection(MainActivity.java:45)

お願い助けて!

4

0 に答える 0