You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android Instrumentation Test执行失败:安装后测试长时间卡构建

问题:Instrumentation Test 安装后无法执行,卡在构建状态

完成应用与测试包安装后,设备上的Instrumentation Test无法执行,测试有时会卡在“构建”状态长达15分钟以上。

常规错误日志(省略警告与信息后)

2024-08-21 12:34:07.730  1613-1753  InstallApkReceiver      com.miui.home                        E  uninstall:package:com.example.tipcalculator
2024-08-21 12:34:07.763  1392-1392  Recents                 com.android.systemui                 E  packageMonitor   onPackageModified  packageName=com.example.tipcalculator   mIsRecentsWithinLauncher=true
2024-08-21 12:34:07.767  1613-1753  InstallApkReceiver      com.miui.home                        E  install:package:com.example.tipcalculator
2024-08-21 12:34:10.177  1613-1753  InstallApkReceiver      com.miui.home                        E  uninstall:package:com.example.tipcalculator.test
2024-08-21 12:34:10.204  1392-1392  Recents                 com.android.systemui                 E  packageMonitor   onPackageModified  packageName=com.example.tipcalculator.test   mIsRecentsWithinLauncher=true
2024-08-21 12:34:10.207  1613-1753  InstallApkReceiver      com.miui.home                        E  install:package:com.example.tipcalculator.test
2024-08-21 12:34:15.991 19753-19753 libc                    com.example.tipcalculator            E  Access denied finding property "ro.vendor.df.effect.conflict"

非必现错误日志

2024-08-21 12:40:06.302  1613-1753  InstallApkReceiver      com.miui.home                        E  uninstall:package:com.example.tipcalculator
2024-08-21 12:40:07.455  1392-1392  Recents                 com.android.systemui                 E  packageMonitor   onPackageModified  packageName=com.example.tipcalculator.test   mIsRecentsWithinLauncher=true
2024-08-21 12:40:07.460  1613-1753  InstallApkReceiver      com.miui.home                        E  uninstall:package:com.example.tipcalculator.test
2024-08-21 12:40:29.552  1392-1392  Recents                 com.android.systemui                 E  packageMonitor   onPackageModified  packageName=com.example.tipcalculator   mIsRecentsWithinLauncher=true
2024-08-21 12:40:29.553  1613-1753  InstallApkReceiver      com.miui.home                        E  install:package:com.example.tipcalculator
2024-08-21 12:40:30.036  1613-1766  Launcher.AllAppsList    com.miui.home                        E  Can't load postion for packageName: com.example.tipcalculator activityName: com.example.tipcalculator.MainActivity
2024-08-21 12:40:32.477  3332-3505  AppOpsAdapter           com.lbe.security.miui                E   doApplyAppPermissionConfig error  (Ask Gemini)
                                                                                                    android.content.pm.PackageManager$NameNotFoundException: com.example.tipcalculator.test
                                                                                                        at android.app.ApplicationPackageManager.getPackageInfoAsUser(ApplicationPackageManager.java:194)
                                                                                                        at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:161)
                                                                                                        at com.lbe.security.service.provider.internal.AppOpsAdapter$AppOpsAdapterHandler.doApplyAppPermissionConfig(Unknown Source:30)
                                                                                                        at com.lbe.security.service.provider.internal.AppOpsAdapter$AppOpsAdapterHandler.handleMessage(Unknown Source:86)
                                                                                                        at android.os.Handler.dispatchMessage(Handler.java:107)
                                                                                                        at android.os.Looper.loop(Looper.java:225)
                                                                                                        at android.os.HandlerThread.run(HandlerThread.java:67)
2024-08-21 12:40:33.492  1392-1392  Recents                 com.android.systemui                 E  packageMonitor   onPackageModified  packageName=com.example.tipcalculator.test   mIsRecentsWithinLauncher=true
2024-08-21 12:40:33.497  1613-1753  InstallApkReceiver      com.miui.home                        E  install:package:com.example.tipcalculator.test
---------------------------- PROCESS STARTED (22711) for package com.example.tipcalculator ----------------------------
2024-08-21 12:40:38.211 22711-22711 libc                    com.example.tipcalculator            E  Access denied finding property "ro.vendor.df.effect.conflict"

已尝试的排查动作

  • 重启设备
  • 重新插拔设备
  • 查阅相关技术帖子,但问题成因与已知案例不同

内容的提问来源于stack exchange,提问作者user26867952

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.19 06:17:03