-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.NoSuchFieldError: no "Ljava/lang/String;" field "oauthToken" in class "Lcom/spotify/sdk/android/player/Config;" or its superclasses #143
Comments
This looks like an error coming from the actual streaming SDK itself, which is unfortunately deprecated now. I don't think there's really much I can do to fix this. Is it possible to use the debug version for release on Android? |
It may also work if you use an older API version, although I'm not entirely sure. |
Thanks for your quick response !
I really don't know..
Like how ? |
You said you were using Android API 28. Try using an older version. |
I've tested with Android API 26/27 right now, it's not working.. |
Then I'm honestly not sure. I'd try and see if you can force using the debug version of the android streaming SDK |
Yeah, I don't know how to do force one package to use debug version haha |
It seems "enableProguardInReleaseBuilds" (minifyEnabled = true) is crashing the app |
From the app's gradle file or the react native module's gradle file?
…On Thu, Sep 19, 2019, 2:40 PM Nolane ***@***.***> wrote:
It seems "enableProguardInReleaseBuilds" (minifyEnabled = true) is
crashing the app
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#143?email_source=notifications&email_token=AB3VGUN5RKHXYVELLO54PXLQKPBRFA5CNFSM4IYMAYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7EN5GI#issuecomment-533257881>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB3VGUMAHJDYB2CF6AZHKMDQKPBRFANCNFSM4IYMAYMQ>
.
|
From the app's gradle file !
|
It's not a bad things to disable minifyEnabled ? Android Console will warned me about that no? |
Ok so, I've tried to update the "proguard-rules.pro" file like this (and it works!):
|
Would you be open to making a PR?
…On Thu, Sep 19, 2019, 4:19 PM Nolane ***@***.***> wrote:
Ok so, I've tried to update the proguard rule like this (and it works!):
-keep class com.lufinkey.react.spotify.RNSpotifyPackage.** { *; }
-keep class com.lufinkey.react.spotify.** { *; }
-keep class com.spotify.sdk.android.authentication.RNSpotifyPackage.** { *; }
-keep class com.spotify.sdk.android.player.SpotifyPlayer.** { *; }
-keep class com.spotify.sdk.android.player.** { *; }
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#143?email_source=notifications&email_token=AB3VGUKQNBUTTH6ZZ7R3IVTQKPNEZA5CNFSM4IYMAYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7EWSAQ#issuecomment-533293314>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB3VGUIRUCFOHMYOJ47UPYLQKPNEZANCNFSM4IYMAYMQ>
.
|
I don't know how to modify this rule on app's proguard-rules.pro (clearly I'm new on React Native development), maybe making a note/add troubleshooting in the readme is better ? |
On real device with intern test on Android, App is crashing :
|
Is this after you've disabled proguard completely? |
Not completely, I just activate proguard and put the rules I wrote right upon |
Hi,
I'm currently trying to build my project in Release mode on Android and it keep crashing when using Spotify.login() or Spotify.loginWithSession().
I'm building to a Google Pixel 3 with API 28.
In debug mode (on iOS and Android) it works like a charm but in release (only for Android) it's not working.
The error :
React: 16.8.3
React Native: 0.59.9
RN Spotify SDK: 1.2.10
Android API: 28 (v9.0 Pie)
Gradle: 5.4.1
Android Plugin Version: 3.4.0
The text was updated successfully, but these errors were encountered: