react-native-spotify icon indicating copy to clipboard operation
react-native-spotify copied to clipboard

Could not invoke RNSpotify.playURI, dlopened failed

Open AntonMyr opened this issue 6 years ago • 11 comments

React-native version: 0.59.9 Android version: 9

I tried the example app and everything went well until I came to the Spotify.playURI part because then I got this error: [ IMG_20190612_131804

Error message: dlopen failed: library "/vendor/lib64/libgnustl_shared.so" needed or dlopened by "/system/lib64/libnativeloader.so" is not accessible for the namespace "classloader-namespace"

AntonMyr avatar Jun 12 '19 11:06 AntonMyr

I also tried replacing playURI with queueURI() and skipToNext() and got the same error.

AntonMyr avatar Jun 12 '19 11:06 AntonMyr

What device is this running on?

lufinkey avatar Jun 12 '19 15:06 lufinkey

It's running on Huawei p20 pro

AntonMyr avatar Jun 12 '19 15:06 AntonMyr

Is that 64 bit?

lufinkey avatar Jun 12 '19 15:06 lufinkey

Yes it is.

AntonMyr avatar Jun 12 '19 15:06 AntonMyr

@AntonMyr did u find any solution? If u find could share it ?

IbrahimCanKALYA avatar Sep 13 '19 15:09 IbrahimCanKALYA

@IbrahimCanKALYA No, unfortunately not. I'm not working on this project anymore.

AntonMyr avatar Sep 15 '19 19:09 AntonMyr

@AntonMyr thanks for reply.

IbrahimCanKALYA avatar Sep 15 '19 19:09 IbrahimCanKALYA

If you are building 64 bit apk with new feature of react-native & requirement of play store.

you should remove packagingOptions from build.gradle

packagingOptions {
    pickFirst 'lib/armeabi-v7a/libgnustl_shared.so'
    pickFirst 'lib/x86/libgnustl_shared.so'
    exclude 'lib/arm64-v8a/libgnustl_shared.so'
    exclude 'lib/x86_64/libgnustl_shared.so'
}

removing packaging options solved problem

IbrahimCanKALYA avatar Sep 20 '19 13:09 IbrahimCanKALYA

If you are building 64 bit apk with new feature of react-native & requirement of play store.

you should remove packagingOptions from build.gradle

packagingOptions {
    pickFirst 'lib/armeabi-v7a/libgnustl_shared.so'
    pickFirst 'lib/x86/libgnustl_shared.so'
    exclude 'lib/arm64-v8a/libgnustl_shared.so'
    exclude 'lib/x86_64/libgnustl_shared.so'
}

removing packaging options solved problem

I can confirm after removing packagingOptions below, the playURI method works again.

iamcxa avatar Nov 21 '19 07:11 iamcxa

Can also confirm removing packagingOptions in /android/app/build.gradle solved the problem. For others, this also fixed a problem I was having when logging in (with facebook) the app would crash and require reopening. After reopening, my app would initialize with my credentials tho. Thanks and hope this helps!

chalupagrande avatar Apr 09 '20 18:04 chalupagrande