Skip to content
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

Hawk crashed if put Enum #218

Open
wa1demar opened this issue Jul 5, 2018 · 1 comment
Open

Hawk crashed if put Enum #218

wa1demar opened this issue Jul 5, 2018 · 1 comment

Comments

@wa1demar
Copy link

wa1demar commented Jul 5, 2018

Please try to fill all questions below before submitting an issue.

  • On which android versions do you have this issue? : 8.1
  • On which phones do you have this issue? : Google Pixel 2
  • Which hawk version are you using? : 2.0.1
  • Does this issue happen always or is it flaky? : always

Here is my enum

public enum OrderStatus {
    UNDEFINED(null), PENDING("Pending"), RECEIVED("Received"), SHIPPED("Shipped"), CANCELLED("Cancelled"), REFUNED("Refunded");
    private String mLocalizedValue;

    OrderStatus(String localizedValue) {
        mLocalizedValue = localizedValue;
    }

    public String getLocalizedValue() {
        return mLocalizedValue;
    }
}

And here is my error

java.lang.NoSuchFieldException: UNDEFINED

Here is my solution

-keepclassmembers enum * { *; }
@nEdAy
Copy link

nEdAy commented Nov 15, 2018

mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants