Ask Your Question
0

Unfortunately, OCV T1 Add OpenCV has stopped (opencv4android)

asked 2013-01-27 17:45:36 -0600

bdg26 gravatar image

Hi All, I'm trying to get just the sample programs to run in an emulator for opencv4android. I've followed the tutorial but continue to get errors when running the program. It compiles fine. I've installed OpenCV_2.4.3.2_Manager_2.4_armeabi.apk on my emulator, which is runnning android 3.0 (API 11). Whenever I install any sample program, for instance tutorial 1, I get errors similar to the following in logcat:

E/AndroidRuntime( 788): FATAL EXCEPTION: main

E/AndroidRuntime( 788): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.opencv.samples.tutorial1/org.opencv.samples.tutorial1.Sample1Java}: java.lang.ClassNotFoundException: org.opencv.samples.tutorial1.Sample1Java

E/AndroidRuntime( 788): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)

E/AndroidRuntime( 788): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)

E/AndroidRuntime( 788): at android.app.ActivityThread.access$600(ActivityThread.java:123)

E/AndroidRuntime( 788): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)

E/AndroidRuntime( 788): at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 788): at android.os.Looper.loop(Looper.java:137)

E/AndroidRuntime( 788): at android.app.ActivityThread.main(ActivityThread.java:4424)

E/AndroidRuntime( 788): at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 788): at java.lang.reflect.Method.invoke(Method.java:511)

E/AndroidRuntime( 788): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

E/AndroidRuntime( 788): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

E/AndroidRuntime( 788): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 788): Caused by: java.lang.ClassNotFoundException: org.opencv.samples.tutorial1.Sample1Java

E/AndroidRuntime( 788): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)

E/AndroidRuntime( 788): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)

E/AndroidRuntime( 788): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)

E/AndroidRuntime( 788): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)

E/AndroidRuntime( 788): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)

E/AndroidRuntime( 788): ... 11 more

Does anyone have any sugggestions? Thanks!

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2013-01-29 18:48:30 -0600

bdg26 gravatar image

Everything was resolved by changing from java 1.7 to 1.6. Thanks Ben

edit flag offensive delete link more
0

answered 2013-01-29 12:32:51 -0600

org.opencv.samples.tutorial1.Sample1Java class implements Activity on Tutorial-1 sample. It looks like a problem with broken *.apk file or AndroidManifest.xml mismatch with Java code. You need to edit manifest and replace Sample1Java class name on your main Activity class name (android:name attribute in Activity tag).

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-27 17:45:36 -0600

Seen: 1,587 times

Last updated: Jan 29 '13