【问题标题】:Spotify API crashing because of Library issueSpotify API 因库问题而崩溃
【发布时间】:2015-12-23 01:25:45
【问题描述】:

我已经使用 SpotifyAPI 很长时间了,但它在尝试加载播放器时随机开始崩溃。这是我得到的错误

12-22 20:20:01.995 28130-28130/com.skyrealm.brockyy.spotifyapi E/AndroidRuntime: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.skyrealm.brockyy.spotifyapi-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libgnustl_shared.so"

我得到这个错误的代码行是

Spotify.getPlayer(playerConfig, this, new Player.InitializationObserver() {

感谢您的宝贵时间!
- 石鱼

【问题讨论】:

    标签: android spotify libspotify


    【解决方案1】:

    我认为您可能刚刚达到 64k 方法限制

    这是当您拥有的代码量(包括库)超过 Android 通常打包到一个 dex 文件(也就是您的 apk)时。 有办法

    试试这个解决办法:

    http://developer.android.com/tools/building/multidex.html

    当你达到这个限制时会很伤心 :-( 并且通常在你的项目中有使用过的代码可以通过修剪来整理它(包括未使用的库代码)。


    另一种可能性是您正在编写本机 (NDK) 代码,对此我帮不上忙 :)

    【讨论】:

      猜你喜欢
      • 2019-02-25
      • 2020-05-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-15
      • 1970-01-01
      相关资源
      最近更新 更多