5

I use Win 8, jdk7, Eclipse 4.2, Andoird SDK (ADT) Rev 21, OpenCV 2.4.3, C/C++ Dev. Tools 8.1.1. Installed are all Android Target SDK's since API Level 8. As described in: http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html

After importing the library and sample projects I receive following errors in the File OpenCVEngineInterface. It's the same with mac os.

Description Resource    Path    Location    Type 
The method asBinder() of type OpenCVEngineInterface.Stub must override a superclass method  OpenCVEngineInterface.java  /OpenCV Library -
2.4.3/gen/org/opencv/engine line 35 Java Problem 
The method asBinder() of type OpenCVEngineInterface.Stub.Proxy must override a superclass method    OpenCVEngineInterface.java  /OpenCV Library -
            2.4.3/gen/org/opencv/engine line 96 Java Problem 
The method getEngineVersion() of type OpenCVEngineInterface.Stub.Proxy must override a superclass method    OpenCVEngineInterface.java  /OpenCV Library - 2.4.3/gen/org/opencv/engine   line 107    Java Problem 
    The method getLibPathByVersion(String) of type OpenCVEngineInterface.Stub.Proxy must override a superclass method   OpenCVEngineInterface.java  /OpenCV Library - 2.4.3/gen/org/opencv/engine   line 129    Java Problem 
    The method installVersion(String) of type OpenCVEngineInterface.Stub.Proxy must override a superclass method    OpenCVEngineInterface.java  /OpenCV Library - 2.4.3/gen/org/opencv/engine   line 152    Java Problem 
    The method getLibraryList(String) of type OpenCVEngineInterface.Stub.Proxy must override a superclass method    OpenCVEngineInterface.java  /OpenCV Library - 2.4.3/gen/org/opencv/engine   line 175    Java Problem

4 Answers 4

12

Concretely yesterday night, I got the same problem as you and today I've found the solution. Apparently, or our Eclipse's have some default configuration or the Eclipse Projects we got from OpenCV are wrong.

To solve the problem, go to your project under Eclipse and:

  1. Right mouse button
  2. Properties
  3. Java Compiler
  4. Compiler Compliance Level = 1.6

I had the Java version 1.5 and it has some problems with overriding methods, but with Java 1.6 it's working fine! I hope I've helped you :D

EDIT: The solution I've exposed it's better than the other one. You don't have to change your ADT, just change the version of the Java Compiler and it will work without problems :D

Sign up to request clarification or add additional context in comments.

Comments

1

Looks like some incompatibilities in Eclipse project settings between different version of ADT plug-in. To remove those errors you have to delete .settings folder from /sdk/java folder before export to Eclipse. thanks to: Andrey Pavlenko http://answers.opencv.org/question/4209/build-errors-after-opencv-library-import/

Comments

0

A solution was posted here that worked for me...

http://answers.opencv.org/question/4209/build-errors-after-opencv-library-import/

remove .settings folder under OpenCV-2/sdk/java before importing the sample projects.

Comments

0

I got this problem too.

Here is my solution: 1.Open OpenCV-2.4.3-android-sdk\sdk\java.settings\org.eclipse.jdt.core.prefs 2.Replace 1.5 to 1.6

This is because of java compiler version.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.