简体   繁体   中英

OpenCV Android Studio Set-up problems

I am trying to use opencv in android studio but am having some problems. I have searched the forums but couldn't find this exact problem. I am clicking file > import module and entering the following file path: OpenCV-2.4.10-android-sdk\\sdk\\java

I then receive an import summary like this:

ECLIPSE ANDROID PROJECT IMPORT SUMMARY

Ignored Files:

The following files were not copied into the new Gradle project; you should evaluate whether these are still needed in your project and if so manually move them:

  • javadoc\\
  • javadoc\\allclasses-frame.html
  • javadoc\\allclasses-noframe.html
  • javadoc\\constant-values.html
  • javadoc\\help-doc.html
  • javadoc\\index-all.html
  • javadoc\\index.html
  • javadoc\\org\\ ... the summary includes a lot more libraries that are not included but I didn't want to list pointless additional information. ...

Moved Files:

Android Gradle projects use a different directory structure than ADT Eclipse projects. Here's how the projects were restructured:

  • AndroidManifest.xml => openCVLibrary2410\\src\\main\\AndroidManifest.xml
  • lint.xml => openCVLibrary2410\\lint.xml
  • res\\ => openCVLibrary2410\\src\\main\\res\\
  • src\\ => openCVLibrary2410\\src\\main\\java\\
  • src\\org\\opencv\\engine\\OpenCVEngineInterface.aidl => openCVLibrary2410\\src\\main\\aidl\\org\\opencv\\engine\\OpenCVEngineInterface.aidl

Next Steps:

You can now build the project. The Gradle project needs network connectivity to download dependencies.

Bugs:

If for some reason your project does not build, and you determine that it is due to a bug or limitation of the Eclipse to Gradle importer, please file a bug at http://b.android.com with category Component-Tools.

(This import summary is for your information only, and can be deleted after import once you are satisfied with the results.)

Can anyone help me with this issue please?

Even if ".html" files are not copied the code will work.
But as you import the libraries you should get opencv in the dropdown after you type"import org." Instead of importing path:"OpenCV-2.4.10-android-sdk\\sdk\\java" import any one of the samples from the opencv sdk 4 android and the libraries will be imported automatically
eg:-(path:"OpenCV-2.4.11-android-sdk\\OpenCV-android-sdk\\samples\\15-puzzle")
then you can always remove the module from properties.
Its best to have version 2.4.11

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM