bulkTransfer 使应用程序崩溃

bulkTransfer makes the application crash

我正在开发用于将 arduino 连接到 Android 的应用程序。一切正常,
但我遇到了一个问题:

When I'm getting data from the arduino it makes the program to crash.

我每 2 毫秒使用 bulkTransfer 和 Runnable 线程获取数据。

任何帮助,提前致谢!

我的问题是我想访问可运行线程内的 UI 线程,这导致应用程序崩溃。减少与 GUI 的交互解决了我的问题。