joaopedronardari / opencv-androidsamples Goto Github PK
View Code? Open in Web Editor NEWOpenCv samples for Android from OpenCV SDK using Android Studio and Gradle System
License: MIT License
OpenCv samples for Android from OpenCV SDK using Android Studio and Gradle System
License: MIT License
Pls help me to fix below issue.
/Official/workspace/DermAsist/opencv_sample/app/src/main/jni/DetectionBasedTracker.cpp
Error:(4, 33) opencv2/objdetect.hpp: No such file or directory
compilation terminated.
/Official/workspace/DermAsist/opencv_sample/app/src/main/jni/Tutorial2.cpp: In function 'void Java_com_jnardari_opencv_1androidsamples_activities_Tutorial2Activity_FindFeatures(JNIEnv_, jobject, jlong, jlong)':
/Official/workspace/DermAsist/opencv_sample/app/src/main/jni/Tutorial2.cpp
Error:(19, 67) error: invalid user-defined conversion from 'int' to 'const string& {aka const std::basic_string&}' [-fpermissive]
Ptr detector = FastFeatureDetector::create(50);
^
/Users/apple/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/string
Information:(52) (Unknown) In file included
/Users/apple/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/basic_string.h
Information:(495, 7) candidate is: std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const CharT, const _Alloc&) [with _CharT = char; Traits = std::char_traits; Alloc = std::allocator]
Information:(495, 7) no known conversion for argument 1 from 'int' to 'const char'
/Official/workspace/DermAsist/opencv_sample/app/src/main/jni/Tutorial2.cpp:19:67: error: invalid conversion from 'int' to 'const char' [-fpermissive]
Information:(495, 7) initializing argument 1 of 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]'
Error:Execution failed for task ':app:compileArmeabiDebugArmNdklibrarysampleSharedLibraryNdklibrarysampleMainCpp'.
Multiple build operations failed.
C++ compiler failed while compiling DetectionBasedTracker.cpp.
C++ compiler failed while compiling Tutorial2.cpp.
See the complete log at: file:///Official/workspace/DermAsist/opencv_sample/app/build/tmp/compileArmeabiDebugArmNdklibrarysampleSharedLibraryNdklibrarysampleMainCpp/output.txt
Information:BUILD FAILED
Information:Total time: 1.936 secs
Information:3 errors
Hi, i got and error occured. did i missed something else ?
here the error information :
Information:Gradle tasks [clean, :app:generateArmDebugSources, :app:generateArmDebugAndroidTestSources, :app:compileArmDebugSources, :app:compileArmDebugAndroidTestSources, :libraries:opencv:generateDebugSources, :libraries:opencv:generateDebugAndroidTestSources, :libraries:opencv:compileDebugSources, :libraries:opencv:compileDebugAndroidTestSources]
C:\Users\Asus-Akueajim\Desktop\OpenCV-AndroidSamples-master\app\src\main\jni\Tutorial2.cpp
Error:(2, 33) opencv2/core/core.hpp: No such file or directory
C:\Users\Asus-Akueajim\Desktop\OpenCV-AndroidSamples-master\app\src\main\jni\DetectionBasedTracker.cpp
Error:Execution failed for task ':app:compileArmeabiDebugArmNdklibrarysampleSharedLibraryNdklibrarysampleMainCpp'.
Multiple build operations failed.
C++ compiler failed while compiling Tutorial2.cpp.
C++ compiler failed while compiling DetectionBasedTracker.cpp.
See the complete log at: file:///C:/Users/Asus-Akueajim/Desktop/OpenCV-AndroidSamples-master/app/build/tmp/compileArmeabiDebugArmNdklibrarysampleSharedLibraryNdklibrarysampleMainCpp/output.txt
Information:BUILD FAILED
Information:Total time: 25.095 secs
Information:3 errors
Information:0 warnings
Information:See complete output in console
Error:Cause: buildToolsVersion is not specified.
Hi, it looks like a great samples and exactly what I need. Unfortunately I can't find a link to the corresponding tutorial. Is there some step by step explanation to these files?
Why I can't compile the module "ndklibrarysample" into the APK? I extracted the APK and could not find the required libndklibrarysample.so, making that Face Detection and Tutorial 2 failed to work. Is any parameter or setting that I'm missing here?
OK, managed to solve the problem by using these settings:
Download zip file of this repository, unzip it somewhere. Then Open AS 2.1, Open Project by locating the directory which contains 'app' folder. Modify the jni include directory in the 'build.gradle (Module: app)' file to our OpenCV SDK folder, then Run this app into Android device/emulator. That's all. Phew! Took me many days to get this..
Hello,
I got the issue when I open this project in the Android Studio 2.2.2.
Gradle 'OpenCV-AndroidSamples-master' project refresh failed
Error:Cannot set readonly property: proguardFiles for class: com.android.build.gradle.managed.BuildType
I can't solve this issue.
Please help me.
Thank you.
I update libs for use with Android Studio 3.0 and I can't build with command line
./gradlew clean build
Do show I made this PR #10 and now I run into this
/Users/hannes/Development/android-ndk-r10b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: fatal error: --sysroot=: must take a non-empty argument
collect2: error: ld returned 1 exit status
Hi,
Thank you for sharing the code.
There is one small issue in the code that may have caused errors for some people. It's nice if you mention it in the readme file so people know what to do. The issue is that in your gradle file:
OpenCV-AndroidSamples/app/build.gradle
Line 30 in 62b23f9
you have referred to the sdk on your own computer. People need to change that in order to make the code work.
I meet a problem about that for when I set the sample in my android studio and make a apk.
the android studio will meet a error.It tell me the function OpenCVLoader.initAsync() meet a error.
I don`t know why, could you help me?
hello i have a problem with camera orientation . i saw your application , it looks you have the same problem in your app ;
i was wondering if there is a solution for that ??
I can't build with command line ./gradlew clean build
I changed some minor paths and make ./gradew execute able for a Mac on this PR #12
but I see this and have no clue, what's wrong here, probably someone has a clue what's wrong here
:app:compileArm64-v8aDebugArmNdklibrarysampleSharedLibraryNdklibrarysampleMainCpp
/Users/hannes/git/openCV/OpenCV-AndroidSamples/app/src/main/jni/DetectionBasedTracker.cpp:1:17: fatal error: jni.h: No such file or directory
#include <jni.h>
^
compilation terminated./Users/hannes/git/openCV/OpenCV-AndroidSamples/app/src/main/jni/Tutorial2.cpp:1:17: fatal error: jni.h: No such file or directory
#include <jni.h>
^
compilation terminated.:app:compileArm64-v8aDebugArmNdklibrarysampleSharedLibraryNdklibrarysampleMainCpp FAILED
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':app:compileArm64-v8aDebugArmNdklibrarysampleSharedLibraryNdklibrarysampleMainCpp'.Multiple build operations failed.
C++ compiler failed while compiling Tutorial2.cpp.
C++ compiler failed while compiling DetectionBasedTracker.cpp.
See the complete log at: file:///Users/hannes/git/openCV/OpenCV-AndroidSamples/app/build/tmp/compileArm64-v8aDebugArmNdklibrarysampleSharedLibraryNdklibrarysampleMainCpp/output.txt
Error:(2, 33) opencv2/core/core.hpp: No such file or directory
Plugin with id 'com.android.model.application' not found.
I'm not able to integrate OpenCV Gradle with com.android.model.application with my current project with Gradle com.android.application and andoid-apt system.
can not be OpenCV just a library? without modifying the project structure?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.