我只是想连接到我的 websocket 服务器:
ws = net().createWebSocket("ws://192.168.0.3:8000/sample", this);
当我用mvn test -Pjava测试它时它工作正常
但是当我用我的谷歌 Nexus S(在冰淇淋三明治下)加载它时,我得到:
E/AndroidRuntime( 4321): FATAL EXCEPTION: GLThread 352
E/AndroidRuntime( 4321): java.lang.UnsupportedOperationException
E/AndroidRuntime( 4321): at playn.core.NetImpl.createWebSocket(NetImpl.java:27)
E/AndroidRuntime( 4321): at com.github.dawicorti.qrcomsample.core.CommunicationScreen.<init>(CommunicationScreen.java:34)
E/AndroidRuntime( 4321): at com.github.dawicorti.qrcomsample.core.QRComSample.init(QRComSample.java:12)
E/AndroidRuntime( 4321): at playn.android.AndroidPlatform.run(AndroidPlatform.java:170)
E/AndroidRuntime( 4321): at playn.core.PlayN.run(PlayN.java:47)
E/AndroidRuntime( 4321): at com.github.dawicorti.qrcomsample.android.QRComSampleActivity.main(QRComSampleActivity.java:13)
E/AndroidRuntime( 4321): at playn.android.GameViewGL$3.run(GameViewGL.java:94)
E/AndroidRuntime( 4321): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462)
E/AndroidRuntime( 4321): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
W/ActivityManager( 249): Force finishing activity com.github.dawicorti.qrcomsample.android/.QRComSampleActivity