2015-06-21 88 views
0

我想完成Android SDK的初學者教程。我做了所有的通道,並沒有生成錯誤occours,但啓動應用程序,當我嘗試與Facebook進行身份驗證,在logcat中,我發現「登錄失敗」登錄失敗的Spotify Android SDK教程

06-21 18:34:39.282 14033-14033/com.example.lucabrognara.spotify_prova D/MainActivity﹕ Login failed 

這裏完整的日誌

06-21 18:34:34.642 14033-14033/? D/dalvikvm﹕ Late-enabling CheckJNI 
06-21 18:34:34.877 14033-14033/com.example.lucabrognara.spotify_prova D/libEGL﹕ loaded /system/lib/egl/libEGL_mali.so 
06-21 18:34:34.897 14033-14033/com.example.lucabrognara.spotify_prova D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_mali.so 
06-21 18:34:34.902 14033-14033/com.example.lucabrognara.spotify_prova D/libEGL﹕ loaded /system/lib/egl/libGLESv2_mali.so 
06-21 18:34:34.907 14033-14033/com.example.lucabrognara.spotify_prova D/﹕ Device driver API match 
    Device driver API version: 10 
    User space API version: 10 
06-21 18:34:34.907 14033-14033/com.example.lucabrognara.spotify_prova D/﹕ mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Thu Oct 25 08:43:05 KST 2012 
06-21 18:34:34.932 14033-14033/com.example.lucabrognara.spotify_prova D/OpenGLRenderer﹕ Enabling debug mode 0 
06-21 18:34:35.032 14033-14033/com.example.lucabrognara.spotify_prova I/webclipboard﹕ clipservice: [email protected] 
06-21 18:34:35.112 14033-14034/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ GC_CONCURRENT freed 158K, 13% free 9649K/11079K, paused 14ms+12ms, total 45ms 
06-21 18:34:35.117 14033-14033/com.example.lucabrognara.spotify_prova D/WebView﹕ loadUrlImpl: called 
06-21 18:34:35.137 14033-14050/com.example.lucabrognara.spotify_prova V/webkit﹕ BrowserFrame constructor: this=Handler (android.webkit.BrowserFrame) {41b75b88} 
06-21 18:34:35.182 14033-14033/com.example.lucabrognara.spotify_prova D/WebView﹕ onSizeChanged - w:442 h:724 
06-21 18:34:35.187 14033-14050/com.example.lucabrognara.spotify_prova D/webcore﹕ CORE loadUrl: called 
06-21 18:34:35.187 14033-14050/com.example.lucabrognara.spotify_prova D/webkit﹕ Firewall not null 
06-21 18:34:35.192 14033-14050/com.example.lucabrognara.spotify_prova D/webkit﹕ euler: isUrlBlocked = false 
06-21 18:34:35.332 14033-14033/com.example.lucabrognara.spotify_prova W/ResourceType﹕ Failure getting entry for 0x010802c0 (t=7 e=704) in package 0 (error -75) 
06-21 18:34:35.382 14033-14034/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ GC_CONCURRENT freed 109K, 13% free 9945K/11335K, paused 13ms+3ms, total 44ms 
06-21 18:34:38.377 14033-14033/com.example.lucabrognara.spotify_prova D/WebCore﹕ uiOverrideUrlLoading: shouldOverrideUrlLoading() returnstrue 
06-21 18:34:38.377 14033-14050/com.example.lucabrognara.spotify_prova I/GATE﹕ <GATE-M>DEV_ACTION_COMPLETED</GATE-M> 
06-21 18:34:38.432 14033-14033/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ DexOpt: couldn't find static field Landroid/os/Build;.SUPPORTED_ABIS 
06-21 18:34:38.432 14033-14033/com.example.lucabrognara.spotify_prova W/dalvikvm﹕ VFY: unable to resolve static field 78 (SUPPORTED_ABIS) in Landroid/os/Build; 
06-21 18:34:38.432 14033-14033/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ VFY: replacing opcode 0x62 at 0x000d 
06-21 18:34:38.432 14033-14033/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ DexOpt: couldn't find static field Landroid/os/Build;.SUPPORTED_ABIS 
06-21 18:34:38.432 14033-14033/com.example.lucabrognara.spotify_prova I/dalvikvm﹕ DexOpt: unable to optimize static field ref 0x004e at 0x17 in Lcom/spotify/sdk/android/player/Config;.createOsVersionString 
06-21 18:34:38.442 14033-14033/com.example.lucabrognara.spotify_prova W/ApplicationContext﹕ Unable to create external files directory 
06-21 18:34:38.452 14033-14033/com.example.lucabrognara.spotify_prova I/dalvikvm﹕ Could not find method android.media.AudioTrack.setVolume, referenced from method com.spotify.sdk.android.player.AudioTrackController.createAudioTrack 
06-21 18:34:38.452 14033-14033/com.example.lucabrognara.spotify_prova W/dalvikvm﹕ VFY: unable to resolve virtual method 694: Landroid/media/AudioTrack;.setVolume (F)I 
06-21 18:34:38.452 14033-14033/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x004c 
06-21 18:34:38.457 14033-14033/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ Trying to load lib /data/data/com.example.lucabrognara.spotify_prova/lib/libgnustl_shared.so 0x41b2f108 
06-21 18:34:38.457 14033-14033/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ Added shared lib /data/data/com.example.lucabrognara.spotify_prova/lib/libgnustl_shared.so 0x41b2f108 
06-21 18:34:38.457 14033-14033/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ No JNI_OnLoad found in /data/data/com.example.lucabrognara.spotify_prova/lib/libgnustl_shared.so 0x41b2f108, skipping init 
06-21 18:34:38.457 14033-14033/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ Trying to load lib /data/data/com.example.lucabrognara.spotify_prova/lib/libspotify_embedded_shared.so 0x41b2f108 
06-21 18:34:38.462 14033-14033/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ Added shared lib /data/data/com.example.lucabrognara.spotify_prova/lib/libspotify_embedded_shared.so 0x41b2f108 
06-21 18:34:38.462 14033-14033/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ No JNI_OnLoad found in /data/data/com.example.lucabrognara.spotify_prova/lib/libspotify_embedded_shared.so 0x41b2f108, skipping init 
06-21 18:34:38.462 14033-14033/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ Trying to load lib /data/data/com.example.lucabrognara.spotify_prova/lib/libspotify_sdk.so 0x41b2f108 
06-21 18:34:38.462 14033-14033/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ Added shared lib /data/data/com.example.lucabrognara.spotify_prova/lib/libspotify_sdk.so 0x41b2f108 
06-21 18:34:38.507 14033-14033/com.example.lucabrognara.spotify_prova E/SpannableStringBuilder﹕ SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length 
06-21 18:34:38.507 14033-14033/com.example.lucabrognara.spotify_prova E/SpannableStringBuilder﹕ SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length 
06-21 18:34:38.527 14033-14120/com.example.lucabrognara.spotify_prova D/SpotifySDK﹕ Use diskcache: true 
06-21 18:34:38.527 14033-14120/com.example.lucabrognara.spotify_prova E/SpotifySDK﹕ Cache path '' is not writeable 
06-21 18:34:38.532 14033-14120/com.example.lucabrognara.spotify_prova I/SpotifySDK﹕ Got notification: Became active playing device 
06-21 18:34:38.532 14033-14033/com.example.lucabrognara.spotify_prova D/MainActivity﹕ Playback event received: BECAME_ACTIVE 
06-21 18:34:38.532 14033-14120/com.example.lucabrognara.spotify_prova I/SpotifySDK﹕ playbackCallbackOnSeek (to 0ms) 
06-21 18:34:39.282 14033-14033/com.example.lucabrognara.spotify_prova D/MainActivity﹕ Login failed 
06-21 18:35:17.487 14033-14034/com.example.lucabrognara.spotify_prova D/dalvikvm﹕ GC_CONCURRENT freed 207K, 13% free 10160K/11655K, paused 8ms+12ms, total 92ms 
06-21 18:35:17.492 14033-14033/com.example.lucabrognara.spotify_prova D/webviewglue﹕ nativeDestroy view: 0x4db6e608 

任何想法解決這個問題?我已經嘗試從我的Facebook帳戶刪除應用程序,但理智最多,總是「登錄失敗」

更新1

我已經打印出異常的消息勞克的onLoginFailed方法:

06-21 18:53:59.362 28201-28201/com.example.lucabrognara.spotify_prova D/MainActivity﹕ Login failed: The operation requires a Spotify Premium account 

我不知道爲什麼登錄我需要一個溢價賬...

更新2

我明確要求一個測試帳戶和the answer,我猜,關閉這個問題:

問:「有一種方法可以使用測試帳戶?我開發一個Android應用程序,我需要的Spotify認證」

答:‘沒有@lucabro,恐怕你需要有一個Spotify的高級賬戶才能使用此SDK’

+0

我想你應該在[Spotify的Android SDK中的GitHub項目]這個文件(https://github.com/spotify/android-sdk)。 –

回答

1

Spotify的沒有按「T似乎讓免費用戶,不知道雖然

編輯:是的,他們確實需要一個溢價賬截至目前,因爲你發現了

https://github.com/spotify/android-sdk/issues/49

+0

完全播放不適用於非高級用戶,但登錄應該適用於所有用戶。 –

+0

我真的只實施了教程應用程序,沒有更多,併爲該應用程序似乎需要一個溢價... 該應用程序應允許登錄成功時進行身份驗證和播放曲目... – Lucabro

0

Spotify的API訪問有不同的範圍收集信息,並且其中一個或多個需要付費帳戶。我認爲你應該嘗試訪問範圍「流媒體」,這是溢價。

檢查線路:

builder.setScopes (new String [ ] { "scopeexample1", "scopeexample2" }) ;