Git Product home page Git Product logo

Comments (6)

jenly1314 avatar jenly1314 commented on May 26, 2024

麻烦问一下ZXingLite你使用的哪个版本,CaptureActivity目前没有这么多行,描述详细点,我好定位。

from zxinglite.

zhoushunli avatar zhoushunli commented on May 26, 2024

不好意思,近期事情太多,推迟这么久才回复,望见谅,我用的版本是1.0.6版本,然后最近的gp后台监测有一个新的空指针,日志如下:
java.lang.RuntimeException:
at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:4009)
at android.app.ActivityThread.performPauseActivity (ActivityThread.java:3975)
at android.app.ActivityThread.performPauseActivity (ActivityThread.java:3949)
at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:3923)
at android.app.ActivityThread.-wrap15 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1642)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6626)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:811)
Caused by: java.lang.NullPointerException:
at com.king.zxing.CaptureActivity.onPause (CaptureActivity.java:318)
at android.app.Activity.performPause (Activity.java:7176)
at android.app.Instrumentation.callActivityOnPause (Instrumentation.java:1430)
at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:3998)
at android.app.ActivityThread.performPauseActivity (ActivityThread.java:3975)
at android.app.ActivityThread.performPauseActivity (ActivityThread.java:3949)
at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:3923)
at android.app.ActivityThread.-wrap15 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1642)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6626)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:811)

我是用的gradle引入的
classpath 'com.android.tools.build:gradle:3.2.1'

麻烦有空的时候帮忙看下,谢谢了

from zxinglite.

jenly1314 avatar jenly1314 commented on May 26, 2024

查看1.0.6历史版本记录,根据你发的报错信息定位是SurfaceView 空指针导致的?
建议最好是升级到目前最新版本,然后测试并定位,看此问题是否依然存在。

from zxinglite.

zhoushunli avatar zhoushunli commented on May 26, 2024

查看1.0.6历史版本记录,根据你发的报错信息定位是SurfaceView 空指针导致的?
建议最好是升级到目前最新版本,然后测试并定位,看此问题是否依然存在。

好的,我会试一下的,谢谢回复

from zxinglite.

houyidg avatar houyidg commented on May 26, 2024

大哥,google了一下,是因为你这个ondestory 销毁camera的时候是调用子线程。反复进入的时候就会初始化失败而崩溃。坑

from zxinglite.

houyidg avatar houyidg commented on May 26, 2024

还有就是你这个初始化camera比我用腾讯的人脸识别初始化慢了400ms左右

from zxinglite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.