amggg / YXing

481 stars 38 forks source link

跟这个库有冲突,同时引用会报一个很诡异的错误 https://github.com/LuckSiege/PictureSelector #10

Closed mry1 closed 3 years ago

mry1 commented 3 years ago

异常堆栈: java.lang.AbstractMethodError: abstract method "java.lang.Object androidx.camera.core.impl.CameraFactory.getCameraManager()" at androidx.camera.core.CameraX.lambda$initAndRetryRecursively$9$CameraX(CameraX.java:566) at androidx.camera.core.-$$Lambda$CameraX$PyTMqE8rSnFsLpsANtL2ojEI5QI.run(Unknown Source:10) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:929)

mry1 commented 3 years ago

我把代码拉下来调试了一下,发现是你的库使用的cameraX版本与别的库使用的cameraX不一样,这种情况下只要同时使用这两种依赖,打开扫码的时候就会直接崩溃。解决方法是把每个库使用的cameraX版本统一起来,算是cameraX的一个bug吧。。