Skip to content Skip to sidebar Skip to footer

Opencv For Android: Sample Project Classnotfound Exception

I'm trying to run a sample from opencv for android. It's not working. java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.opencv.samples.puzzle15/org.open

Solution 1:

After Importing from this OpenCV for android and download ADT Bundle

Instead of this :

   Warning : After the initial import, on a non-Windows (Linux and Mac OS) operating system Eclipse will still show build errors for applications with native C++ code. To resolve the issues, please do the following:
Open Project Properties -> C/C++ Build, and replace “Build command” textto"${NDKROOT}/ndk-build" (remove .cmd at the end).

try following steps:

Download the ndk build Android NDK

Specify the NDK location:

Windows >>> preferences >> Android >> NDK >> Set the location of the NDK (which u have downloaded from the above link)

Get location of the project :

Right Click on the project >>> properties >> resource >> location

Eg : Location : D:\OpenCV-2.4.6-android-sdk-r2\OpenCV-2.4.6-android-sdk\samples\15-puzzle

Build the project using cmd:

D:\OpenCV-2.4.6-android-sdk-r2\OpenCV-2.4.6-android-sdk\samples\15-puzzle>D:\android-ndk-r9\ndk-build

D:\android-ndk-r9\ndk-build(Your NDK path)

Note: Make sure u have included the library project and installed OpenCV Manager

Post a Comment for "Opencv For Android: Sample Project Classnotfound Exception"