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 trial

Android Android Lists and Adapters (2015) Using Parcelable Data Parceling Data

error: method getDailyForecast in class Forecast cannot be applied to given types; required: Day[] found: no arguments

reason: actual and formal argument lists differ in length

Ben did not take any arguments to the method startDailyActivity for the onClick on dailyButton, and in my code it's requiring a argument!!!

1 Answer

Hiya,

The error is probably referring to the return type of getDailyForecast() which is Day[]. Plus, that method does take an argument: private Day[] getDailyForecast(String jsonData). And startDailyActivity takes a View as an argument.

I think we need to see some of your code here. This is a runtime issue, I presume? Are there any compiler warnings?

Steve.

Hi Steve, thanks for answer. I just found the error and right now is working fine. It was all about getters and setters, in the getters method I have set up arguments that was the error.

Thanks.