我正在开发一个android应用程序的形式AppleMusicKit。我已经取得了用户播放列表和专辑使用API的。但现在我试图播放一首歌曲使用代码
val tokenProvider = object : TokenProvider {
override fun getDeveloperToken(): String = token.developerToken
override fun getUserToken(): String = token.userToken
}
val applePlayerController = MediaPlayerControllerFactory.createLocalController(applicationContext, tokenProvider)
val queueProviderBuilder = CatalogPlaybackQueueItemProvider.Builder()
queueProviderBuilder.containers(MediaContainerType.PLAYLIST, id)
当icreateLocalController应用程序崩溃时。这是我得到的异常
java.lang.UnsatisfiedLinkError: No implementation found for int com.apple.android.music.foothill.javanative.FootHillConfig.config(java.lang.String) (tried Java_com_apple_android_music_foothill_javanative_FootHillConfig_config and Java_com_apple_android_music_foothill_javanative_FootHillConfig_config__Ljava_lang_String_2)
at com.apple.android.music.foothill.javanative.FootHillConfig.config(Native Method)
at com.apple.android.music.playback.c.g.a(MusicSDK:23)
at com.apple.android.music.playback.c.b.<init>(MusicSDK:182)
at com.apple.android.music.playback.c.f.a(MusicSDK:48)
at com.apple.android.music.playback.controller.a.<init>(MusicSDK:159)
at com.apple.android.music.playback.controller.MediaPlayerControllerFactory.createLocalController(MusicSDK:62)
我不知道我在这里错过了什么。我也在权限中添加了FOREGROUND_SERVICE。
1条答案
按热度按时间anhgbhbe1#
我已通过添加以下行修复了此问题