bytedeco / javacv

Java interface to OpenCV, FFmpeg, and more
Other
7.42k stars 1.57k forks source link

Caused by: java.lang.NoClassDefFoundError: java.lang.ClassNotFoundException: org.bytedeco.javacpp.presets.javacpp #1831

Open Code-Lonely opened 2 years ago

Code-Lonely commented 2 years ago

I encountered a problem when using javacv ffmpeg. Classnotfoundexception will be thrown when running. image I checkedapp-debug.apkpackageclasse.dexCode in the file,It is found that the javacpp dependency has changed into this, so the org bytedeco. javacpp. presets. Javacpp class. image can you tell me why this happens. Gradle dependencies -

implementation (group: 'org.bytedeco', name: 'javacv', version: '1.5.7'){
    transitive=false
}
implementation group: 'org.bytedeco', name: 'ffmpeg', version: '5.0-1.5.7'
implementation group: 'org.bytedeco', name: 'ffmpeg', version: '5.0-1.5.7', classifier: 'android-arm'
saudet commented 2 years ago

Please try to add a dependency on ffmpeg-platform.

Code-Lonely commented 2 years ago

Some classes are missing after packaging. What is the problem.

Code-Lonely commented 2 years ago

Please try to add a dependency on ffmpeg-platform.

Can you be more specific

Code-Lonely commented 2 years ago

Please try to add a dependency on ffmpeg-platform.

How to add

saudet commented 2 years ago

Ah, you're getting an actual ClassNotFoundException. That's ProGuard, you'll need to disable that: https://github.com/bytedeco/javacv/wiki/Configuring-Proguard-for-JavaCV

Code-Lonely commented 2 years ago

Thank you. It has been settled

Code-Lonely commented 2 years ago

@saudet Can you consider adding soundtouch support? http://www.surina.net/soundtouch/index.html

saudet commented 2 years ago

Sure, contributions are welcome: https://github.com/bytedeco/javacpp-presets/wiki/Create-New-Presets