Android デバイスでソケット接続を作成しようとしています。しかし、書いSocket s = new Socket("192.168.1.126",3000)
て実行するとすぐにエラーが発生します
FATAL EXCEPTION: main
10-01 16:18:55.509: E/AndroidRuntime(15664): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.senddata1/com.example.senddata1.SendData1}: java.lang.NullPointerException: println needs a message
10-01 16:18:55.509: E/AndroidRuntime(15664): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1818)
10-01 16:18:55.509: E/AndroidRuntime(15664): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1834)
10-01 16:18:55.509: E/AndroidRuntime(15664): at android.app.ActivityThread.access$500(ActivityThread.java:122)
10-01 16:18:55.509: E/AndroidRuntime(15664): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1027)
10-01 16:18:55.509: E/AndroidRuntime(15664): at android.os.Handler.dispatchMessage(Handler.java:99)
10-01 16:18:55.509: E/AndroidRuntime(15664): at android.os.Looper.loop(Looper.java:132)
10-01 16:18:55.509: E/AndroidRuntime(15664): at android.app.ActivityThread.main(ActivityThread.java:4126)
10-01 16:18:55.509: E/AndroidRuntime(15664): at java.lang.reflect.Method.invokeNative(Native Method)
10-01 16:18:55.509: E/AndroidRuntime(15664): at java.lang.reflect.Method.invoke(Method.java:491)
10-01 16:18:55.509: E/AndroidRuntime(15664): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
10-01 16:18:55.509: E/AndroidRuntime(15664): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
10-01 16:18:55.509: E/AndroidRuntime(15664): at dalvik.system.NativeStart.main(Native Method)
10-01 16:18:55.509: E/AndroidRuntime(15664): Caused by: java.lang.NullPointerException: println needs a message
10-01 16:18:55.509: E/AndroidRuntime(15664): at android.util.Log.println_native(Native Method)
10-01 16:18:55.509: E/AndroidRuntime(15664): at android.util.Log.e(Log.java:230)
10-01 16:18:55.509: E/AndroidRuntime(15664): at com.example.senddata1.SendData1.onCreate(SendData1.java:66)
10-01 16:18:55.509: E/AndroidRuntime(15664): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1050)
10-01 16:18:55.509: E/AndroidRuntime(15664): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1782)
10-01 16:18:55.509: E/AndroidRuntime(15664): ... 11 more
Plsは私が直面している問題を助けてくれます。