Android 未找到 opencv 管理器包?怎么自动安装?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22784875/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 06:27:12  来源:igfitidea点击:

opencv manager package was not found?? how install automatcally?

androidopencvjavacv

提问by Muhammad Ahsan Maqsood Awan

I am working on openCV, and whenever i run code it gives me package manager is not installed, So how can i installed this through my application.Is it compulsory to download it from play store or we can installed it automatically in device. please help me. thanks in advance.

我正在开发 openCV,每当我运行代码时,它都会给我未安装包管理器,那么我如何通过我的应用程序安装它。是必须从 Play 商店下载它还是我们可以在设备中自动安装它。请帮我。提前致谢。

回答by Manish Mulimani

You need to use static initialization to include all OpenCV binaries in the apk. Please refer this documentation: Application Development with Static Initialization

您需要使用静态初始化将所有 OpenCV 二进制文件包含在 apk 中。请参阅此文档:使用静态初始化的应用程序开发

回答by MHD adnan albukaai

1- after you download Opencv library from this site:

1- 从本站下载 Opencv 库后:

http://sourceforge.net/projects/opencvlibrary/files/opencv-android/

http://sourceforge.net/projects/opencvlibrary/files/opencv-android/

2- open apk folder, there are some opencv manager package.

2-打开apk文件夹,里面有一些opencv manager包。

3- select one that suitable for your device and install it.

3- 选择一个适合您的设备并安装它。

Important Note: if the package (the apk file) you select is not suitable for your device you will get opencv library package was not found.

重要提示:如果您选择的包(apk 文件)不适合您的设备,您将获得opencv library package was not found.

回答by berak

you can also run :

你也可以运行:

adb install OpenCV_***_Manager_***.apk

from the shell locally

从本地壳

回答by Anubhav Pandey

You did not copy the contents of libs folder which is inside the native folder

您没有复制本机文件夹内的 libs 文件夹的内容

After downloading and unzipping the OpenCv release and after importing the module in the android studio project (by File > New > Import Modules and choosing the java folder inside the unzipped sdk) you also have to go to.

下载并解压 OpenCv 版本并在 android studio 项目中导入模块后(通过文件 > 新建 > 导入模块并选择解压后的 sdk 中的 java 文件夹),您还必须转到。

Opencv-android-sdk > sdk > native > libs

Opencv-android-sdk > sdk > 本机 > 库

and copy the entire the contents

并复制整个内容

Then go to your android project and inside the app folder you have to make a new folder by the name of jniLibsand copy the contents there followed by a Rebuild Project

然后转到您的 android 项目,在 app 文件夹中,您必须以jniLibs的名称创建一个新文件夹,然后复制其中的内容,然后是重建项目