Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialManohar HS
1,084 PointsMy app is crashing when i was pressing "show another fun fact".
I am getting these error in logcat:
java.lang.IllegalArgumentException: Unknown color
at android.graphics.Color.parseColor(Color.java:225)
at com.example.parithi_a.funfacts.ColorWheel.getColor(ColorWheel.java:32)
at com.example.parithi_a.funfacts.FunFactsActivity$1.onClick(FunFactsActivity.java:37)
at android.view.View.performClick(View.java:4780)
at android.view.View$PerformClick.run(View.java:19866)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
1 Answer
karis hutcheson
7,036 PointsWithout looking at your source code, it looks like you've passed an invalid color into your background property upon clicking the button. It looks like you have a class named ColorWheel. I would revisit that class and make sure you've formatted your colors properly, either as HEX values (#FFFFFF) or as android system colors (Color.BLACK).