Closed goatchurchprime closed 4 years ago
@goatchurchprime Thank you for taking interest in our repo. I am really sorry that we could not get back to you earlier. Are you still facing this issue and interested in a solution. If so, we would be glad to help.
@goatchurchprime I would now close this issue. If you still need help, please open a new issue.
The error I started with was here:
It seemed like it had to do with the line in the file opencv4_1_0_contrib/build.gradle
The repository https://github.com/dcendents/android-maven-gradle-plugin (which might have something to do with this) says:
Naively replacing the above with the line
apply plugin: 'com.github.sky-uk.gradle-maven-plugin'
didn't work.Working from the other end from what works, I loaded this app project into the AndroidStudio, set its module dependency to be opencv4_1_0_contrib, changed the
build.gradle (Module: app) android { defaultConfig { minSdkVersion
from 19 to 21 (as suggested in the errors), noted that the project Gradle Version was 4.6, and it ran and installed and said "Hello World!".Then I noticed a "Plugin Update Recommended" in AndroidStudio, that said:
So I clicked on update, and it stopped working. So I thought that the Gradle 5.4.1 is the problem. However, when I removed all the instances of
android:minSdkVersion="8"
that were causing errors, I got to:The fix of replacing deprecated library with koptlin-stdlib-jdk7 is given in https://stackoverflow.com/questions/53448450/how-to-resolve-error-failed-to-resolve-org-jetbrains-kotlinkotlin-stdlib-jre7
And I got to "Hello World" on the app again. I was even able to include the line:
import org.opencv.aruco.CharucoBoard
in the MainActivity.kt file once I had established the module dependency on opencv4_1_0_contrib.Then I made a completely clean install of my project from the repo https://github.com/Future-Hangglider/Hanglog3 (removing the module depdendencies), did a File New Import Module from the upgraded and working opencv4_1_0_contrib, and hit the same
ERROR: Plugin with id 'com.github.dcendents.android-maven' not found.
But then I found a some extra lines in the build.gradle files of the Hello World working app and ported them to my dependencies section:
And then I got this:
Now, there are a lot of $binTray variables under the opencv4_1_0_contrib module in the Project structure.
This had me stumped, until I discovered more lines at the bottom of the Hello World app build.gradle file:
Now it compiles, build, links, deploys, and crashes with the following:
I thought that when the AndroidStudio put the app together and says it is good to go, it's good to go. Apparently not.
It ran when I commented out all my OpenCV function calls it ran, except for the fact that
OpenCVLoader.initDebug()
is false.The same is true when I went back to the Hello World app and inserted the line
Am I missing something where you have to know what to do with the cmake files in opencv4_1_0_contrib/native/jni/abi-arm64-v8a ?
The official downloaded copy of OpenCV (without the contrib Aruco module that I need) contains a file
opencv-4.1.2-android-sdk/OpenCV-android-sdk/sdk/native/libs/arm64-v8a/libopencv_java4.so
that is missing from the quickbirds directory tree.How does it get built?