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 trialDennis Kumar
2,047 Pointserror: array required, but int found
I put the code same as in the video but the android shows an error: array required, but int found.
How can i fix this ?
Linda de Haan
12,413 PointsWithout reviewing your code we can't really help you, but from what the error says, you're probably trying to return an int where the codes expects an array. I took a look at the video and he is parsing a String array with hex colors to an int. Make sure you did that correctly.
1 Answer
Dennis Kumar
2,047 PointsOh! It was basically I spelled my array name while parsing incorrectly. It works now. Thankyou :)
Binyamin Friedman
14,615 PointsBinyamin Friedman
14,615 PointsCould you elaborate? What code did you put in?