Closed Vibinreji closed 6 years ago
Same issue i am facing.
@prachi07 if u find any solution just let me know.
Check the 'lib' folder in your built apk, like this:
For example, if your app depends on library A and B, and library A provides native libs for both armeabi-v7a
and arm64-v8a
, library B provides native lib only for armeabi-v7a
, then eventually your app would have 'lib' folder with following structure:
lib/
├── armeabi-v7a/
│ ├── liba.so // from library A
│ └── libb.so // from library B
└── arm64-v8a/
└── liba.so // from library A
When the app runs on devices that only support armeabi-v7a
, everthing is OK. But when it runs on devices support arm64-v8a
, the system may only look into 'arm64-v8a' folder and unable to find 'libb.so' hence the UnsatisfiedLinkError
.
This demo depends on an old version 1.3 of JavaCV, which only provides ffmpeg native libs for 'android-arm'(armeabi-v7a
). If you need support for arm64-v8a
, you should use version 1.4+, which provides native libs for arm64-v8a
.
You can configure dependencies as follows:
dependencies {
...
def javacvVersion = '1.4.2'
def ffmpegVersion = '4.0.1'
compile(group: 'org.bytedeco', name: 'javacv-platform', version: javacvVersion) {
exclude group: 'org.bytedeco.javacpp-presets'
}
compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: "${ffmpegVersion}-${javacvVersion}"
compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: "${ffmpegVersion}-${javacvVersion}", classifier: 'android-arm' // for 'armeabi-v7a'
compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: "${ffmpegVersion}-${javacvVersion}", classifier: 'android-arm64' // for 'arm64-v8a'
}
If UnsatisfiedLinkError
still occurs after this, try ReLinker.
Thankyou @CrazyOrr
Thanks @CrazyOrr.
Hi, My app is crashing when i open video recording page.Demo app is working fine .Here i attached the logs.