Ask Your Question

Revision history [back]

  1. Try downloading ADT-Bundle from http://developer.android.com/sdk/index.html If you are using 64 bit download 64 bit version.
  2. Download NDK from http://developer.android.com/tools/sdk/ndk/index.html
  3. Download OpenCV for Android from http://sourceforge.net/projects/opencvlibrary/

  4. Open your Home Folder in Linux /C drive in Windows.

  5. Create a Folder "Android" to keep SDK, NDK, OpenCV SDK. Open the created Folder.
  6. Extract ADT-Bundle to "Android" folder.
  7. Extract NDK to "Android" folder.
  8. Don't rename the extracted folder. If you rename,You need to change Eclipse Prefernce. Open Eclipse>Window>Preferences>Android.
  9. In the Android Tab check your SDK location. If not correct Browse to extracted SDK location.

  10. To Add NDK Location open Eclipse>Window>Preferences>Android>NDK. Browse to extracted NDK folder.

  11. Extract OpenCVAndroid to "Android" folder.
  12. Now Open Eclipse>FIle>Import>Existing Android Code into WorkSpace> Browse to "Android/OpenCV-2.4.8-android-sdk/samples/". Select All project, Tick the CheckBox"Copy Project to WorkSpace". 13.Most probably you might get a lot of errors. 14.First you need to remove errors from "OpenCV Library - 2.4.8" project.
  13. Right click "OpenCV Library - 2.4.8">Android Tools>Fix Project Properties. if errors are not removed try deleting the contents of "gen" folder.
  14. For all other sample projects Right click the project, click Properties>Android>Library remove the library reference and click Add>Select OpenCV Libr ary - 2.4.8 17.If Error exist delete the contents of "gen" folder. 18.Depending on the Platform set NDK path for Ubuntu http://stackoverflow.com/questions/19608610/how-to-set-android-sdk-ndk-and-jdk-paths-in-ubuntu-12-04 for Windows set NDK and OpenCV path in WindowsEnvironment.