-
Notifications
You must be signed in to change notification settings - Fork 444
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
Proguard issue of API ver 2.0.5 #58
Comments
|
Can you share some code that reproduces this? Thanks in advance! |
|
Sure, my project body is located in here |
|
@fgoinai, I can't compile your GetDroplets-Pub app because its missing all the static resources (e.g. So I've done some sleuthing, and here is what I've found:
Right now, the best I can guess is that the ProGuard optimization is causing a failure in your JSON parser for the auth result. This can happen when obfuscation is enabled since the TokenResult fields could get renamed. When the JSON parser attempts to decode the JSON response, it won't see the correct field names, and the default empty string value will be used instead. You will likely need to add a keep directive for your TokenResult class to avoid the field renaming: Try adding the keep directive and checking if |
|
Sorry about late reply and I have forgotten to push the resource.
|
Some details: https://www.dropboxforum.com/hc/en-us/community/posts/206959906-Java-API-failure-after-Proguard-handling
Hi,
I found that if I use the recommendation proguard setting, i.e.
The error will appear. All API throw same exception: Error in call to API function "users/API_PARAM": Invalid authorization value in HTTP header "Authorization": "Bearer". Expecting "Bearer "
But if I add two proguard rules instead, all errors disappear.
Either one is lacked will cause the errors appear again. Any idea about on this instead of not using proguard?
I think proguard with dontobfuscate and dontshrink is useless at all.
The text was updated successfully, but these errors were encountered: