ListAdapter - 我不知道我的应用程序崩溃了

如何解决ListAdapter - 我不知道我的应用程序崩溃了

我需要有关应用崩溃原因的帮助。我可以看到它抱怨数组索引大于 16,但是代码在哪里?我不知道。

我基本上请求蓝牙数据,然后在数据到达后,它会打开一个 Activity 在 Listview 中显示数据。当 Listview 尝试启动时应用程序崩溃。

如果需要,我会提供代码。 谢谢

这是我的 LogCat

2021-04-14 16:57:40.160 26029-26058/com.example.ble D/OpenGLRenderer: ProgramCache.generateProgram: 8899172237312
2021-04-14 16:57:47.225 26029-26058/com.example.ble D/Surface: Surface::disconnect(this=0x750a612200,api=1)
2021-04-14 16:57:47.226 26029-26058/com.example.ble D/GraphicBuffer: unregister,handle(0x7508bc39c0) (w:812 h:610 s:816 f:0x1 u:0x000b00)
2021-04-14 16:57:47.226 26029-26058/com.example.ble D/GraphicBuffer: unregister,handle(0x7508ba0540) (w:812 h:610 s:816 f:0x1 u:0x000b00)
2021-04-14 16:57:47.227 26029-26058/com.example.ble D/GraphicBuffer: unregister,handle(0x7508ba2040) (w:812 h:610 s:816 f:0x1 u:0x000b00)
2021-04-14 16:57:47.227 26029-26058/com.example.ble D/Surface: Surface::disconnect(this=0x750a612200,api=1)
2021-04-14 16:57:47.239 26029-26029/com.example.ble D/WindowClient: Remove from mViews: DecorView@7724e1e[],this = android.view.WindowManagerGlobal@d68a129
2021-04-14 16:57:47.240 26029-26041/com.example.ble I/art: Enter while loop.
2021-04-14 16:57:47.250 26029-26029/com.example.ble V/InputMethodManager: onWindowFocus: null softInputMode=32 first=false flags=#81810100
2021-04-14 16:57:47.399 26029-26058/com.example.ble D/OpenGLRenderer: ~CanvasContext() 0x751f97c000
2021-04-14 16:57:47.411 26029-26058/com.example.ble D/OpenGLRenderer: ~CanvasContext() 0x751f975000
2021-04-14 16:57:47.412 26029-26058/com.example.ble D/OpenGLRenderer: ~CanvasContext() 0x751f978800
2021-04-14 16:57:47.414 26029-26058/com.example.ble D/OpenGLRenderer: ~CanvasContext() 0x751f971800
2021-04-14 16:57:48.212 26029-26104/com.example.ble D/HomeFragment: ReadHolding Task Start
2021-04-14 16:57:48.212 26029-26104/com.example.ble D/Service_BTLE_GATT: Clear Buffers
2021-04-14 16:57:48.213 26029-26104/com.example.ble D/BluetoothGatt: writeCharacteristic() - uuid: 2456e1b9-26e2-8f83-e744-f34f01e9d703
2021-04-14 16:57:48.215 26029-26043/com.example.ble D/BluetoothGatt: onCharacteristicWrite() - Device=CC:F9:57:8E:60:C9 handle=25 Status=0
2021-04-14 16:57:48.310 26029-26042/com.example.ble D/BluetoothGatt: onNotify() - Device=CC:F9:57:8E:60:C9 handle=25
2021-04-14 16:57:48.310 26029-26042/com.example.ble D/Service_BTLE_GATT: QTY Bytes in rx_Data = 20
2021-04-14 16:57:48.312 26029-26043/com.example.ble D/BluetoothGatt: onNotify() - Device=CC:F9:57:8E:60:C9 handle=25
2021-04-14 16:57:48.312 26029-26043/com.example.ble D/Service_BTLE_GATT: QTY Bytes in rx_Data = 11
2021-04-14 16:57:48.313 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 0,0xfa
2021-04-14 16:57:48.314 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 1,0x 3
2021-04-14 16:57:48.315 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 2,0x1a
2021-04-14 16:57:48.316 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 3,0x64
2021-04-14 16:57:48.316 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 4,0x 0
2021-04-14 16:57:48.317 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 5,0x 1
2021-04-14 16:57:48.318 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 6,0x 0
2021-04-14 16:57:48.319 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 7,0x 1
2021-04-14 16:57:48.320 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 8,0x 0
2021-04-14 16:57:48.320 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 9,0x7c
2021-04-14 16:57:48.321 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 10,0x 1
2021-04-14 16:57:48.322 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 11,0x 1
2021-04-14 16:57:48.322 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 12,0x 0
2021-04-14 16:57:48.323 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 13,0x 1
2021-04-14 16:57:48.324 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 14,0x 0
2021-04-14 16:57:48.324 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 15,0x 0
2021-04-14 16:57:48.325 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 16,0x 0
2021-04-14 16:57:48.326 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 17,0x15
2021-04-14 16:57:48.326 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 18,0x 0
2021-04-14 16:57:48.327 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 19,0x1e
2021-04-14 16:57:48.327 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 20,0x 0
2021-04-14 16:57:48.328 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 21,0x 0
2021-04-14 16:57:48.329 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 22,0x 0
2021-04-14 16:57:48.330 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 23,0x 0
2021-04-14 16:57:48.330 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 24,0x 0
2021-04-14 16:57:48.331 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 25,0x28
2021-04-14 16:57:48.331 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 26,0x 0
2021-04-14 16:57:48.332 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 27,0x 1
2021-04-14 16:57:48.333 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 28,0x 0
2021-04-14 16:57:48.334 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 29,0xd6
2021-04-14 16:57:48.335 26029-26043/com.example.ble I/ModbusHandler: Decode Message ByteNum: 30,0x58
2021-04-14 16:57:48.335 26029-26043/com.example.ble D/ModbusHandler: CRC GOOD QTY: 1
2021-04-14 16:57:48.335 26029-26043/com.example.ble D/ModbusHandler: Populate Holding Resister Block nr: 0
2021-04-14 16:57:48.335 26029-26043/com.example.ble D/Service_BTLE_GATT: Clear Buffers
2021-04-14 16:57:48.355 26029-26037/com.example.ble I/art: Starting a blocking GC Instrumentation
2021-04-14 16:57:48.355 26029-26037/com.example.ble I/art: Enter while loop.
2021-04-14 16:57:48.495 26029-26029/com.example.ble D/BluetoothAdapter: stopLeScan()
2021-04-14 16:57:48.498 26029-26029/com.example.ble D/BluetoothAdapter: getLeState() returning 12
2021-04-14 16:57:48.498 26029-26029/com.example.ble D/BluetoothAdapter: scan not started yet
2021-04-14 16:57:48.629 26029-26029/com.example.ble D/Activity_ListViewInp: Start Input ListAdapter on CT VT and Relay 1
2021-04-14 16:57:48.659 26029-26029/com.example.ble V/PhoneWindow: DecorView setVisiblity: visibility = 4,Parent = null,this = DecorView@79093fe[]
2021-04-14 16:57:48.662 26029-26029/com.example.ble D/WindowClient: Add to mViews: DecorView@79093fe[Activity_ListViewInp],this = android.view.WindowManagerGlobal@d68a129
2021-04-14 16:57:48.664 26029-26058/com.example.ble D/OpenGLRenderer: CanvasContext() 0x751f971800
2021-04-14 16:57:48.665 26029-26029/com.example.ble D/ViewRootImpl[Activity_ListViewInp]: hardware acceleration is enabled,this = ViewRoot{a122228 com.example.ble/com.example.ble.Activity_ListViewInp,ident = 6}
2021-04-14 16:57:48.669 26029-26029/com.example.ble V/PhoneWindow: DecorView setVisiblity: visibility = 0,Parent = ViewRoot{a122228 com.example.ble/com.example.ble.Activity_ListViewInp,ident = 6},this = DecorView@79093fe[Activity_ListViewInp]
2021-04-14 16:57:48.684 26029-26058/com.example.ble D/Surface: Surface::disconnect(this=0x7526255c00,api=1)
2021-04-14 16:57:48.685 26029-26058/com.example.ble D/GraphicBuffer: unregister,handle(0x75086fbe00) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
2021-04-14 16:57:48.685 26029-26058/com.example.ble D/GraphicBuffer: unregister,handle(0x7508664100) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
2021-04-14 16:57:48.685 26029-26058/com.example.ble D/GraphicBuffer: unregister,handle(0x7508ba09c0) (w:720 h:1280 s:720 f:0x1 u:0x000b00)
2021-04-14 16:57:48.685 26029-26058/com.example.ble D/Surface: Surface::disconnect(this=0x7526255c00,api=1)
2021-04-14 16:57:48.825 26029-26029/com.example.ble W/art: Before Android 4.1,method int androidx.appcompat.widget.DropDownListView.lookForSelectablePosition(int,boolean) would have incorrectly overridden the package-private method in android.widget.ListView
2021-04-14 16:57:48.952 26029-26029/com.example.ble D/AndroidRuntime: Shutting down VM
2021-04-14 16:57:48.964 26029-26029/com.example.ble E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.ble,PID: 26029
    java.lang.ArrayIndexOutOfBoundsException: length=16; index=16
        at android.widget.AbsListView$RecycleBin.addScrapView(AbsListView.java:7424)
        at android.widget.ListView.measureHeightOfChildren(ListView.java:1361)
        at android.widget.ListView.onMeasure(ListView.java:1250)
        at android.view.View.measure(View.java:20084)
        at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:825)
        at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:511)
        at android.view.View.measure(View.java:20084)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6282)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:214)
        at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:146)
        at android.view.View.measure(View.java:20084)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6282)
        at androidx.appcompat.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:490)
        at android.view.View.measure(View.java:20084)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6282)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:214)
        at android.view.View.measure(View.java:20084)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6282)
        at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1705)
        at android.widget.LinearLayout.measureVertical(LinearLayout.java:797)
        at android.widget.LinearLayout.onMeasure(LinearLayout.java:657)
        at android.view.View.measure(View.java:20084)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6282)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:214)
        at com.android.internal.policy.DecorView.onMeasure(DecorView.java:714)
        at android.view.View.measure(View.java:20084)
        at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2640)
        at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1577)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1846)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1462)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6965)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:907)
        at android.view.Choreographer.doCallbacks(Choreographer.java:709)
        at android.view.Choreographer.doFrame(Choreographer.java:644)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:893)
        at android.os.Handler.handleCallback(Handler.java:836)
        at android.os.Handler.dispatchMessage(Handler.java:103)
        at android.os.Looper.loop(Looper.java:203)
        at android.app.ActivityThread.main(ActivityThread.java:6251)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
2021-04-14 16:57:49.212 26029-26104/com.example.ble D/HomeFragment: ReadHolding Task Start
2021-04-14 16:57:49.212 26029-26104/com.example.ble D/Service_BTLE_GATT: Clear Buffers
2021-04-14 16:57:49.213 26029-26104/com.example.ble D/BluetoothGatt: writeCharacteristic() - uuid: 2456e1b9-26e2-8f83-e744-f34f01e9d703
2021-04-14 16:57:49.215 26029-26043/com.example.ble D/BluetoothGatt: onCharacteristicWrite() - Device=CC:F9:57:8E:60:C9 handle=25 Status=0
2021-04-14 16:57:49.310 26029-26042/com.example.ble D/BluetoothGatt: onNotify() - Device=CC:F9:57:8E:60:C9 handle=25
2021-04-14 16:57:49.311 26029-26042/com.example.ble D/Service_BTLE_GATT: QTY Bytes in rx_Data = 20
2021-04-14 16:57:49.313 26029-26076/com.example.ble D/BluetoothGatt: onNotify() - Device=CC:F9:57:8E:60:C9 handle=25
2021-04-14 16:57:49.314 26029-26076/com.example.ble D/Service_BTLE_GATT: QTY Bytes in rx_Data = 8
2021-04-14 16:57:49.316 26029-26043/com.example.ble D/BluetoothGatt: onNotify() - Device=CC:F9:57:8E:60:C9 handle=25
2021-04-14 16:57:49.317 26029-26043/com.example.ble D/Service_BTLE_GATT: QTY Bytes in rx_Data = 1

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 <select id="xxx"> SELECT di.id, di.name, di.work_type, di.updated... <where> <if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 <property name="dynamic.classpath" value="tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams['font.sans-serif'] = ['SimHei'] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -> systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping("/hires") public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate<String
使用vite构建项目报错 C:\Users\ychen\work>npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-