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.
-
I am facing same problem. Hows you resolved.Please help me.Thanks in advance.. – Jagdish May 20 '14 at 13:11
-
You won't get that if you use JavaCV: https://github.com/bytedeco/javacv/ – Samuel Audet Oct 16 '20 at 01:41
-
You need to use static initialization to include all OpenCV binaries in the apk. Please refer this documentation: [Application Development with Static Initialization](http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html#application-development-with-static-initialization) – Manish Mulimani Apr 01 '14 at 12:24
-
In the documentation they wrote "Static initialization is deprecated for the production code" – Nao Kreuzeder May 26 '19 at 18:05
4 Answers
1- after you download Opencv library from this site:
http://sourceforge.net/projects/opencvlibrary/files/opencv-android/
2- open apk folder, there are some opencv manager package.
3- select one that suitable for your device and install it.
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
.

- 6,165
- 17
- 60
- 188

- 41
- 2
-
Small tip, I did this directly on main mobile with a unzip app and installed the apk – Canato Jul 17 '19 at 08:54
you can also run :
adb install OpenCV_***_Manager_***.apk
from the shell locally

- 39,159
- 9
- 91
- 89
-
3it will run on emulator, but whenever installed in android different devices then how will i handle it. – Muhammad Ahsan Maqsood Awan Apr 01 '14 at 12:02
-
this also works with the real device connected. but it may still be a bad answer, as you have to figure out manually , which apk to install, also you need adb/naked_Driver (which your clients probably won't have) – berak Apr 01 '14 at 12:08
-
2yes, this is not a good answer, if i upload it on playstore than how can we do this thing, this is the main problem. – Muhammad Ahsan Maqsood Awan Apr 01 '14 at 12:16
-
@MuhammadAhsanMaqsoodAwan Were you able to find the solution for this? Am also facing the same problem. – Abx Jun 18 '15 at 06:07
-
I got.. `monolaebseus-MacBook-Pro:~ monolabs$ adb install OpenCV_***_Manager_***.apk Performing Streamed Install adb: failed to stat OpenCV_***_Manager_***.apk: No such file or directory` – c-an Dec 28 '19 at 06:28
You did not copy the contents of libs folder which is inside the native folder
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-sdk > sdk > native > libs
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 jniLibs and copy the contents there followed by a Rebuild Project

- 1,285
- 1
- 14
- 18
It worked for me and will shall work for you.
- Unzip and Copy the "OpenCV-android-sdk" project in the root of your android project.
Example:
root
-Project
-OpenCV-android-sdk
Open settings.gradle of your project and paste the code according to your project
def opencvsdk = '../OpenCV-android-sdk' include ':<opencv- project-name>' project(':<opencv- project-name>').projectDir = new File(opencvsdk + '/sdk')```
Now Sync and run the project.

- 89
- 6