ReactNative - Spotify SDK依赖冲突 [英] ReactNative - Spotify SDK dependency conflict
问题描述
我有一个使用Spotify SDK进行Spotify验证的Android模块的ReactNative项目(稍后将使用回放)。
在构建项目时,来自grandle的以下错误:
>复制在APK中复制的文件lib / armeabi-v7a / libgnustl_shared.so
文件1:... root ../ android / app / build / intermediates / exploded-aar / com.facebook.react / react-native / 0.16.1 / jni / armeabi-v7a / libgnustl_shared.so
文件2:... root ../ android / app / build / intermediates / exploded-aar / com.spotify.sdk / spotify-player / 1.0 .0-beta12 / jni / armeabi-v7a / libgnustl_shared.so
使用 packagingOptions
exclude或pickFirst会中断应用程序,因为两个库看起来不同(几乎是两倍大小),但具有相同的名称。
有哪些选项可以解决这个问题?
将以下内容添加到 android / app / build。
似乎没有任何负面影响,该应用程序一直没有任何问题: packagingOptions {
pickFirst'lib / armeabi-v7a / libgnustl_shared.so'
pickFirst'lib / x86 / libgnustl_shared.so'
}
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 ?
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'
}
这篇关于ReactNative - Spotify SDK依赖冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!