lufinkey / react-native-spotify

A react native module for the Spotify SDK. [Deprecated]
378 stars 76 forks source link

Could not invoke RNSpotify.playURI, dlopened failed #130

Open AntonMyr opened 5 years ago

AntonMyr commented 5 years ago

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 commented 5 years ago

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

lufinkey commented 5 years ago

What device is this running on?

AntonMyr commented 5 years ago

It's running on Huawei p20 pro

lufinkey commented 5 years ago

Is that 64 bit?

AntonMyr commented 5 years ago

Yes it is.

IbrahimCanKALYA commented 5 years ago

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

AntonMyr commented 5 years ago

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

IbrahimCanKALYA commented 5 years ago

@AntonMyr thanks for reply.

IbrahimCanKALYA commented 5 years ago

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

iamcxa commented 4 years ago

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.

chalupagrande commented 4 years ago

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!