Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Static initialization in tutorial_dnn_android openCV 3.4.3

How to use sample https://docs.opencv.org/3.4.2/d0/d6c/tutorial_dnn_android.html without a manager? According to the instructions https://docs.opencv.org/master/d5/df8..., I added an SO-file to the opencv_mobilenet\ app\src\main\libs\armeabi folder, but the gradle gives an error when building. How to configure gradle so that it connects libraries from a SO-file or my error is different?

The graddle error is below

Execution failed for task ':app:compileDebugNdk'. Error: Your project contains C++ files but it is not using a supported native build system. Consider using CMake or ndk-build integration. For more information, go to: https://d.android.com/r/studio-ui/add... Alternatively, you can use the experimental plugin: https://developer.android.com/r/tools...

Static initialization in tutorial_dnn_android openCV 3.4.3

How to use sample https://docs.opencv.org/3.4.2/d0/d6c/tutorial_dnn_android.html without a manager? According to the instructions https://docs.opencv.org/master/d5/df8..., I added an SO-file to the opencv_mobilenet\ app\src\main\libs\armeabi folder, but the gradle gives an error when building. How to configure gradle so that it connects libraries from a SO-file or my error is different?

The graddle error is below

Execution failed for task ':app:compileDebugNdk'. Error: Your project contains C++ files but it is not using a supported native build system. Consider using CMake or ndk-build integration. For more information, go to: https://d.android.com/r/studio-ui/add... Alternatively, you can use the experimental plugin: https://developer.android.com/r/tools...

gradle file content

apply plugin: 'com.android.application'

android { compileSdkVersion 28 defaultConfig { applicationId "samples.opencv.org" minSdkVersion 15 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } sourceSets { main { jni.srcDirs = ['src/main/jniLibs'] } }

}

dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation project(':openCVLibrary343') }

click to hide/show revision 3
None

updated 2019-01-18 02:44:26 -0600

berak gravatar image

Static initialization in tutorial_dnn_android openCV 3.4.3

How to use sample https://docs.opencv.org/3.4.2/d0/d6c/tutorial_dnn_android.html without a manager? According to the instructions https://docs.opencv.org/master/d5/df8..., I added an SO-file to the opencv_mobilenet\ app\src\main\libs\armeabi folder, but the gradle gives an error when building. How to configure gradle so that it connects libraries from a SO-file or my error is different?

The graddle error is below

Execution failed for task ':app:compileDebugNdk'. Error: Your project contains C++ files but it is not using a supported native build system. Consider using CMake or ndk-build integration. For more information, go to: https://d.android.com/r/studio-ui/add... Alternatively, you can use the experimental plugin: https://developer.android.com/r/tools...

gradle file content

apply plugin: 'com.android.application'

'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "samples.opencv.org" minSdkVersion 15 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } sourceSets { main { jni.srcDirs = ['src/main/jniLibs'] } }

}

} } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation project(':openCVLibrary343') }

}