iqiyi / Lens

功能简介:一种开发帮助产品研发的效率工具。主要提供了:页面分析、任务分析、网络分析、DataDump、自定义hook 、Data Explorer 等功能。以帮助开发、测试、UI 等同学更便捷的排查和定位问题,提升开发效率。
Apache License 2.0
408 stars 61 forks source link

运行时报错 java.lang.RuntimeException: Unable to get provider com.qiyi.lens.ui.database.LensProvider: java.lang.ClassNotFoundException: #4

Open ljf1172361058 opened 3 years ago

ljf1172361058 commented 3 years ago

具体报错信息:

java.lang.RuntimeException: Unable to get provider com.qiyi.lens.ui.database.LensProvider: java.lang.ClassNotFoundException: Didn't find class "com.qiyi.lens.ui.database.LensProvider" on path: DexPathList[[zip file "/data/app/

引入方式:

dependencies {
    debugImplementation 'com.iqiyi.lens:lens:1.2.3'
    releaseImplementation 'com.iqiyi.lens:lens-no-op:1.2.3'
}

Application onCreate 方法中的代码:

LensUtil.buildConfig()
                .defaultOpen(false)
//                .enableDeviceInfo(true)
//                .enableKeyLog(KeyLogConfig.builder().addFilter("Main").setMaxLine(1000))
//                .enableFPS(true)
//                .enableLaunchTime(true)
//                .setHookFrameWorkImpl(new HookFramework())
                .enableActivityAnalyzer(true)
                .enableNetworkAnalyze(false)
                .enableCrashInfo(true)
//                .addCustomBlockEntrance(customBlockEntrance, new BlockFactory())
//              .addCustomJumpEntrance(customJumpEntrance, new JumpAction())
                .initAsPluginMode(Lens.isSDKMode())
                .enableViewInfo(true)
                .show(Lens.wrapContext(mApplication), UIUtils.getScreenWidth(mApplication) / 5 * 3);
Carlyle-Lee commented 3 years ago

能提供下完整的报错信息吗? 这个类在debug 下,是在包内的。在release 下,不应该被引用到。 麻烦确定下,你是在 release 下报错,还是在debug 下报错。

ljf1172361058 commented 3 years ago

是在 debug下报错的,直接 install 应用的。

开发环境: Android 6.0 Android Studio: 3.0 Gradle: 4.1

Carlyle-Lee commented 3 years ago

我再次验证了下 1.2.3 版本,没有这个启动崩溃问题。 你给的崩溃日志不全,暂时无法定位具体问题。 目前最新版本 1.2.4 做了些优化,fix 了一些问题 ,可以尝试下。 如果还有问题,临时创建了一个qq 群,可以交流: 1126680883