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!

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 Build a Weather App (2015) Hooking Up the Model to the View Setting the Weather Icon

Umy Ikem
Umy Ikem
21,383 Points

Having an error with mCurrentWeather.getIconId() method

private void updateDisplay() {
        mTimelabel.setText("at " + mCurrentWeather.getFormarttedTime() + " it will be");
        mTemperaturelabel.setText(mCurrentWeather.getTemperature() + "");
        mHumidityValue.setText(mCurrentWeather.getHumidity() + "%");
        mPrecipValue.setText(mCurrentWeather.getPrespChance() + "");

        Drawable drawable = ResourcesCompat.getDrawable(getResources(), mCurrentWeather.getIconId(), null);

the getIconId() is in red and when i put my mouse over is i see.........Cannot resolve method 'getIconId()'

pls help i've been stuck here for hours

Ben Deitch
Ben Deitch
Treehouse Teacher

Does your CurrentWeather.java class contain a getIconId method?