一、报错信息
android studio 开发中 , 在 华为 harmonyos 系统的手机 中 调试 android 应用程序 , 出现 logcat 不打印日志的问题 ;
报错信息如下 :
04/14 09:35:12: launching 'app' on huawei ctr-al00.
install successfully finished in 3 s 201 ms.
$ adb shell am start -n "cn.zkhw.client/cn.zkhw.client.loginactivity" -a android.intent.action.main -c android.intent.category.launcher
connected to process 7479 on device 'huawei-ctr_al00-pxuyd22628020934'.
capturing and displaying logcat messages from application. this behavior can be disabled in the "logcat output" section of the "debugger" settings page.
e/behaviorcollectmanager: fail to acquire dataanalyzerservice...
e/adreno-appprofiles: could not find qspm hal service
e/openglrenderer: unable to match the desired swap behavior.
核心报错信息 :
e/behaviorcollectmanager: fail to acquire dataanalyzerservice...
e/adreno-appprofiles: could not find qspm hal service
e/openglrenderer: unable to match the desired swap behavior.
二、解决方案
参考操作步骤 : 按照这个步骤操作 , 就可以解决不打印日志的问题 ;
- 设置完毕后 , 重启手机 , 重启 android studio 即可 ;
图片挂了可参考下面的视频解决问题 :
android studio 鸿蒙不打印logcat日志处理过程
步骤说明 :
① 在拨号界面输入 *#*#2846579#*#*
内容 , 把最后一个 * 打上去之后 , 会自动跳转 , 不需要拨号 ;
② 进入到 " 工程菜单 " 界面 , 选择 " 后台设置 " 选项 ;
③ 选择 " 后台设置 " 中的 " ap log 设置 " 选项 ;
④ 在 " ap log 设置 " 对话框 中 , 选择 " 打开 " 选项 , 然后关闭对话框即可 ;
之后就可以打印出 logcat 日志了 ;
发表评论