I am trying to use a video decode library (org.bytedeco) in the mod. The code can be called in the source code and compiled correctly, but when i enter the game, it throws ClassNotFoundException org.opencv.core.Core and NoClassDefFoundError org/opencv/core/Core. I just implemented 4 libs like this:
implementation 'org.bytedeco:ffmpeg:5.0-1.5.7'
implementation 'org.bytedeco:javacpp:1.5.7'
implementation 'org.bytedeco:javacv:1.5.7'
implementation 'org.bytedeco:opencv:4.5.5-1.5.7'
And considering the runtime dependency, i also used jarJar:
implementation(group : 'org.bytedeco', name : 'ffmpeg', version : '[5.0-1.5.7,6.0)' ){
jarJar.pin(it,'5.0-1.5.7')
}
implementation(group : 'org.bytedeco', name : 'javacpp', version : '[1.5.7,1.6)' ){
jarJar.pin(it,'1.5.7')
}
implementation(group : 'org.bytedeco', name : 'javacv', version : '[1.5.7,1.6)' ){
jarJar.pin(it,'1.5.7')
}
implementation(group : 'org.bytedeco', name : 'opencv', version : '[4.5.5-1.5.7,6.0)' ){
jarJar.pin(it,'4.5.5-1.5.7')
}
i don't know why the compilation can be correct but when i run the game it contains errors.
or i need to add external jar libs in other ways...