Reputation: 994
I get the following exception at runtime when i compile my project width static javacv.jar, opencv.jar, ffmpeg.jar and javacpp.jar files for javacv.
02-05 23:23:56.513 8280-8280/com.teralogics.uvlens E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.teralogics.uvlens, PID: 8280 java.lang.NoClassDefFoundError: java.lang.ClassNotFoundException: org.bytedeco.javacpp.opencv_core at org.bytedeco.javacpp.Loader.load(Loader.java:387) at org.bytedeco.javacpp.Loader.load(Loader.java:353) at org.bytedeco.javacpp.helper.opencv_core$AbstractArray.(opencv_core.java:126)
However, when I follow the following gradle config suggestion, it runs fine:
compile group: 'org.bytedeco', name: 'javacv', version: '0.10' compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '2.4.10-0.10', classifier: 'android-arm' compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '2.5.1-0.10', classifier: 'android-arm'
So what gives? How come javacpp.Loader.load cannot find javacpp.opencv_core class definition? Do I need to include something else? I also tried specifying various combinations of file dependencies within Android Studio's project structure but that didn't help.
Upvotes: 0
Views: 445
Reputation: 994
For everyone else who may come across this issue, I was not including arm
versions of the opencv and ffmpeg jars.
Upvotes: 0