ReactNative - Spotify SDK dependency conflict

不问归期 提交于 2019-12-08 07:56:20

问题


I have a ReactNative project with an Android Module used for authenticating with spotify, using Spotify SDK (will be using playback later on).

When building the project, the following error comes up from grandle:

> Duplicate files copied in APK lib/armeabi-v7a/libgnustl_shared.so
    File 1: ...root../android/app/build/intermediates/exploded-aar/com.facebook.react/react-native/0.16.1/jni/armeabi-v7a/libgnustl_shared.so
    File 2: ...root../android/app/build/intermediates/exploded-aar/com.spotify.sdk/spotify-player/1.0.0-beta12/jni/armeabi-v7a/libgnustl_shared.so

Using packagingOptions exclude or pickFirst breaks the app, as the two libraries appear to be different (one almost double in size) but with the same name.

What options are there to resolve this ?


回答1:


Adding the following to android/app/build.grandle does not seem to have any negative effects, the app has been working without any issues:

packagingOptions {
    pickFirst 'lib/armeabi-v7a/libgnustl_shared.so'
    pickFirst 'lib/x86/libgnustl_shared.so'
}


来源:https://stackoverflow.com/questions/34419989/reactnative-spotify-sdk-dependency-conflict

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!