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

Bug report #26

Open
spacemonkey1101 opened this issue Dec 17, 2020 · 1 comment
Open

Bug report #26

spacemonkey1101 opened this issue Dec 17, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@spacemonkey1101
Copy link
Contributor

Describe the bug
App Crashing due to the error

To Reproduce

  1. Simply Running the app and then login

Expected behavior
Should start with the login page and then to collect basic info of user

Actual behavior
App crashes right after giving OTP

Additional details
Problem in the line in LoginActivity.kt:
sweetAlertDialog.progressHelper.barColor = Color.parseColor(R.color.progressBarColor)

Problem Solved by hard coding values:
sweetAlertDialog.progressHelper.barColor = Color.parseColor("#A5DC86")

Exception:java.lang.IllegalArgumentException: Unknown color

I have tried to solve these errors using:
1.https://stackoverflow.com/questions/32578248/color-parsecolor-is-throwing-an-error-and-app-crashed
2.creating String resources

But only hardcoding the color string in the format "#rrggbb" solved the problem

@spacemonkey1101 spacemonkey1101 added the bug Something isn't working label Dec 17, 2020
@vatsalkesarwani12
Copy link
Member

I guess you should check the import of R in the project this happen sometimes when you refractor your code and R import is not updated. As a result it cannot reference the color.xml and causing error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants