Code Monkey home page Code Monkey logo

Comments (3)

SOFTPOWER1991 avatar SOFTPOWER1991 commented on May 31, 2024 1

@kongqw 我搞定了!这样解决的:

在 CameraFaceDetectionView 中的loadOpenCV 中把loadOpenCV方法改成下面这样就跑起来了:

`
private void loadOpenCV(Context context) {
// 初始化OpenCV
// boolean b = OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_5, context, mLoaderCallback);
// Log.i(TAG, "loadOpenCV: b = " + b);

    if (OpenCVLoader.initDebug()){
        mLoaderCallback.onManagerConnected(LoaderCallbackInterface.SUCCESS);
    }
}`

貌似没发现有启动服务的地方吧?看源码跟服务有关的地方AsyncServiceHelper中的:
public static boolean initOpenCV(String Version, final Context AppContext, final LoaderCallbackInterface Callback) { AsyncServiceHelper helper = new AsyncServiceHelper(Version, AppContext, Callback); if (AppContext.bindService(new Intent("org.opencv.engine.BIND"), helper.mServiceConnection, Context.BIND_AUTO_CREATE)) { return true; } else { AppContext.unbindService(helper.mServiceConnection); InstallService(AppContext, Callback); return false; } }

这块儿咱们不用改吧?

from opencvforandroid.

kongqw avatar kongqw commented on May 31, 2024
Caused by: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=org.opencv.engine.BIND }

@SOFTPOWER1991
Android 5.0 以后要显示启动服务。
你把targetSdkVersion改成 19,或者改下服务启动方式再试试

from opencvforandroid.

kongqw avatar kongqw commented on May 31, 2024

@SOFTPOWER1991
解决了就好!过去太久,封装完了以后也没有再看,有些记不清了,我记得源码里是有启动服务了,我还改过。

from opencvforandroid.

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.