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 鸿蒙不打印Logcat日志处理过程
步骤说明 :
① 在拨号界面输入 *#*#2846579#*#*
内容 , 把最后一个 * 打上去之后 , 会自动跳转 , 不需要拨号 ;
② 进入到 " 工程菜单 " 界面 , 选择 " 后台设置 " 选项 ;
③ 选择 " 后台设置 " 中的 " AP LOG 设置 " 选项 ;
④ 在 " AP LOG 设置 " 对话框 中 , 选择 " 打开 " 选项 , 然后关闭对话框即可 ;
之后就可以打印出 Logcat 日志了 ;