diff --git a/android/package/CMakeLists.txt b/android/package/CMakeLists.txt
index 35025b3e8f..191e61da6f 100644
--- a/android/package/CMakeLists.txt
+++ b/android/package/CMakeLists.txt
@@ -85,8 +85,8 @@ add_custom_command(
COMMAND ${ANT_EXECUTABLE} -q -noinput -k release
COMMAND ${CMAKE_COMMAND} -E touch "${APK_NAME}"
WORKING_DIRECTORY "${PACKAGE_DIR}"
- MAIN_DEPENDENCY "${opencv_java_location}"
- DEPENDS "${PACKAGE_DIR}/${ANDROID_MANIFEST_FILE}" "${PACKAGE_DIR}/res/values/strings.xml" "${PACKAGE_DIR}/res/drawable/icon.png" ${camera_wrappers}
+ MAIN_DEPENDENCY "${PACKAGE_DIR}/${ANDROID_MANIFEST_FILE}"
+ DEPENDS "${OpenCV_BINARY_DIR}/bin/.classes.jar.dephelper" "${PACKAGE_DIR}/res/values/strings.xml" "${PACKAGE_DIR}/res/drawable/icon.png" ${camera_wrappers} opencv_java
)
add_custom_target(android_package ALL SOURCES "${APK_NAME}" )
diff --git a/cmake/OpenCVDetectAndroidSDK.cmake b/cmake/OpenCVDetectAndroidSDK.cmake
index f1bc5499f7..d83b85506d 100644
--- a/cmake/OpenCVDetectAndroidSDK.cmake
+++ b/cmake/OpenCVDetectAndroidSDK.cmake
@@ -324,7 +324,7 @@ macro(add_android_project target path)
install(FILES "${android_proj_bin_dir}/${f}" DESTINATION "samples/${sample_dir}/${install_subdir}" COMPONENT main)
endforeach()
#jni part + eclipse files
- file(GLOB_RECURSE jni_files RELATIVE "${path}" "${path}/jni/*")
+ file(GLOB_RECURSE jni_files RELATIVE "${path}" "${path}/jni/*" "${path}/.cproject")
ocv_list_filterout(jni_files "\\\\.svn")
foreach(f ${jni_files} ".classpath" ".project" ".settings/org.eclipse.jdt.core.prefs")
get_filename_component(install_subdir "${f}" PATH)
diff --git a/modules/java/generator/src/java/android+Utils.java b/modules/java/generator/src/java/android+Utils.java
index 28ca261add..a990cd10be 100644
--- a/modules/java/generator/src/java/android+Utils.java
+++ b/modules/java/generator/src/java/android+Utils.java
@@ -133,11 +133,6 @@ public class Utils {
}
- // native stuff
- static {
- System.loadLibrary("opencv_java");
- }
-
private static native void nBitmapToMat2(Bitmap b, long m_addr, boolean unPremultiplyAlpha);
private static native void nMatToBitmap2(long m_addr, Bitmap b, boolean premultiplyAlpha);
diff --git a/samples/android/face-detection/.cproject b/samples/android/face-detection/.cproject
new file mode 100644
index 0000000000..f915bd4d02
--- /dev/null
+++ b/samples/android/face-detection/.cproject
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/android/face-detection/.project b/samples/android/face-detection/.project
index 11b78325ca..9138486b09 100644
--- a/samples/android/face-detection/.project
+++ b/samples/android/face-detection/.project
@@ -5,6 +5,64 @@
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ auto,full,incremental,
+
+
+ ?name?
+
+
+
+ org.eclipse.cdt.make.core.append_environment
+ true
+
+
+ org.eclipse.cdt.make.core.autoBuildTarget
+
+
+
+ org.eclipse.cdt.make.core.buildArguments
+
+
+
+ org.eclipse.cdt.make.core.buildCommand
+ ${NDKROOT}/ndk-build.cmd
+
+
+ org.eclipse.cdt.make.core.cleanBuildTarget
+ clean
+
+
+ org.eclipse.cdt.make.core.contents
+ org.eclipse.cdt.make.core.activeConfigSettings
+
+
+ org.eclipse.cdt.make.core.enableAutoBuild
+ true
+
+
+ org.eclipse.cdt.make.core.enableCleanBuild
+ false
+
+
+ org.eclipse.cdt.make.core.enableFullBuild
+ true
+
+
+ org.eclipse.cdt.make.core.fullBuildTarget
+
+
+
+ org.eclipse.cdt.make.core.stopOnError
+ true
+
+
+ org.eclipse.cdt.make.core.useDefaultBuildCmd
+ false
+
+
+
com.android.ide.eclipse.adt.ResourceManagerBuilder
@@ -25,9 +83,19 @@
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
com.android.ide.eclipse.adt.AndroidNature
org.eclipse.jdt.core.javanature
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.core.ccnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
diff --git a/samples/android/tutorial-3-native/.cproject b/samples/android/tutorial-3-native/.cproject
new file mode 100644
index 0000000000..d82fb3e76c
--- /dev/null
+++ b/samples/android/tutorial-3-native/.cproject
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/android/tutorial-3-native/.project b/samples/android/tutorial-3-native/.project
index 9c4744691b..c6ba8d1121 100644
--- a/samples/android/tutorial-3-native/.project
+++ b/samples/android/tutorial-3-native/.project
@@ -5,6 +5,64 @@
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ auto,full,incremental,
+
+
+ ?name?
+
+
+
+ org.eclipse.cdt.make.core.append_environment
+ true
+
+
+ org.eclipse.cdt.make.core.autoBuildTarget
+
+
+
+ org.eclipse.cdt.make.core.buildArguments
+
+
+
+ org.eclipse.cdt.make.core.buildCommand
+ ${NDKROOT}/ndk-build.cmd
+
+
+ org.eclipse.cdt.make.core.cleanBuildTarget
+ clean
+
+
+ org.eclipse.cdt.make.core.contents
+ org.eclipse.cdt.make.core.activeConfigSettings
+
+
+ org.eclipse.cdt.make.core.enableAutoBuild
+ true
+
+
+ org.eclipse.cdt.make.core.enableCleanBuild
+ false
+
+
+ org.eclipse.cdt.make.core.enableFullBuild
+ true
+
+
+ org.eclipse.cdt.make.core.fullBuildTarget
+
+
+
+ org.eclipse.cdt.make.core.stopOnError
+ true
+
+
+ org.eclipse.cdt.make.core.useDefaultBuildCmd
+ false
+
+
+
com.android.ide.eclipse.adt.ResourceManagerBuilder
@@ -25,9 +83,19 @@
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
com.android.ide.eclipse.adt.AndroidNature
org.eclipse.jdt.core.javanature
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.core.ccnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
diff --git a/samples/android/tutorial-4-mixed/.cproject b/samples/android/tutorial-4-mixed/.cproject
new file mode 100644
index 0000000000..ca5bdb6b23
--- /dev/null
+++ b/samples/android/tutorial-4-mixed/.cproject
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/android/tutorial-4-mixed/.project b/samples/android/tutorial-4-mixed/.project
index 52fff840c0..f7482e3e98 100644
--- a/samples/android/tutorial-4-mixed/.project
+++ b/samples/android/tutorial-4-mixed/.project
@@ -5,6 +5,64 @@
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ auto,full,incremental,
+
+
+ ?name?
+
+
+
+ org.eclipse.cdt.make.core.append_environment
+ true
+
+
+ org.eclipse.cdt.make.core.autoBuildTarget
+
+
+
+ org.eclipse.cdt.make.core.buildArguments
+
+
+
+ org.eclipse.cdt.make.core.buildCommand
+ ${NDKROOT}/ndk-build.cmd
+
+
+ org.eclipse.cdt.make.core.cleanBuildTarget
+ clean
+
+
+ org.eclipse.cdt.make.core.contents
+ org.eclipse.cdt.make.core.activeConfigSettings
+
+
+ org.eclipse.cdt.make.core.enableAutoBuild
+ true
+
+
+ org.eclipse.cdt.make.core.enableCleanBuild
+ false
+
+
+ org.eclipse.cdt.make.core.enableFullBuild
+ true
+
+
+ org.eclipse.cdt.make.core.fullBuildTarget
+
+
+
+ org.eclipse.cdt.make.core.stopOnError
+ true
+
+
+ org.eclipse.cdt.make.core.useDefaultBuildCmd
+ false
+
+
+
com.android.ide.eclipse.adt.ResourceManagerBuilder
@@ -25,9 +83,19 @@
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
com.android.ide.eclipse.adt.AndroidNature
org.eclipse.jdt.core.javanature
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.core.ccnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature