Lens
Lens copied to clipboard
运行时报错 java.lang.RuntimeException: Unable to get provider com.qiyi.lens.ui.database.LensProvider: java.lang.ClassNotFoundException:
具体报错信息:
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);
能提供下完整的报错信息吗? 这个类在debug 下,是在包内的。在release 下,不应该被引用到。 麻烦确定下,你是在 release 下报错,还是在debug 下报错。
是在 debug下报错的,直接 install 应用的。
开发环境: Android 6.0 Android Studio: 3.0 Gradle: 4.1
我再次验证了下 1.2.3 版本,没有这个启动崩溃问题。 你给的崩溃日志不全,暂时无法定位具体问题。 目前最新版本 1.2.4 做了些优化,fix 了一些问题 ,可以尝试下。 如果还有问题,临时创建了一个qq 群,可以交流: 1126680883