我自己的两台手机,能否直接用代码将两台手机连接起来,从而进行数据传递?我用socket连接时报了这个错
E/AndroidRuntime(17392): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
...全文
771打赏收藏
两台手机通讯
我自己的两台手机,能否直接用代码将两台手机连接起来,从而进行数据传递?我用socket连接时报了这个错 E/AndroidRuntime(17392): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
这个错误是 你在线程中使用handler 没有Looper,具体解决方案自行百度 线程中使用handler
至于两台手机通信 可以考虑利用手机自带的热点 或者 蓝牙都能实现