android - Why does this code get me a "Cannot find symbol" error when I declare the method in this page? -


hi wondering why getting error saying cannot find symbol bindhour when have declared @ bottom of page? appreciated, thank in advance!!

package com.dredaydesigns.stormy.adapters;   import android.support.v7.widget.recyclerview; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; import android.widget.imageview; import android.widget.textview;  import com.dredaydesigns.stormy.r; import com.dredaydesigns.stormy.weather.hour;  /**  * created andreas on 7/2/2015.  */ public class houradapter extends recyclerview.adapter {     private hour [] mhours;     public houradapter(hour [] hours) {         mhours = hours;     }      @override     public recyclerview.viewholder oncreateviewholder(viewgroup parent, int viewtype) {         view view = layoutinflater.from(parent.getcontext())                 .inflate(r.layout.hourly_list_item, parent, false);         hourviewholder viewholder = new hourviewholder(view);         return viewholder;     }      @override     public void onbindviewholder(recyclerview.viewholder holder, int position) {         holder.bindhour(mhours[position]);     }      @override     public int getitemcount() {         return mhours.length;     }       public class hourviewholder extends recyclerview.viewholder {          public textview mtimelabel;         public textview msummarylabel;         public textview mtemperaturelabel;         public imageview miconimageview;          public hourviewholder(view itemview) {             super(itemview);              mtimelabel = (textview) itemview.findviewbyid(r.id.timelabel);             msummarylabel = (textview) itemview.findviewbyid(r.id.summarylabel);             mtemperaturelabel = (textview) itemview.findviewbyid(r.id.temperaturelabel);             miconimageview = (imageview) itemview.findviewbyid(r.id.iconimageview);         }     public void bindhour(hour hour) {      mtimelabel.settext(hour.gethour());     msummarylabel.settext(hour.getsummary());     mtemperaturelabel.settext(hour.gettemperature() + "");     miconimageview.setimageresource(hour.geticonid());   } } } 

and here logcat got when tried run it. seem s have problem bindhour in onbindviewholder method?

information:gradle tasks [clean, :app:compiledebugsources, :app:compiledebugandroidtestsources] :app:clean :app:prebuild up-to-date :app:predebugbuild up-to-date :app:checkdebugmanifest :app:prereleasebuild up-to-date :app:preparecomandroidsupportappcompatv72211library :app:preparecomandroidsupportrecyclerviewv72211library :app:preparecomandroidsupportsupportv42211library :app:preparedebugdependencies :app:compiledebugaidl :app:compiledebugrenderscript :app:generatedebugbuildconfig :app:generatedebugassets up-to-date :app:mergedebugassets :app:generatedebugresvalues up-to-date :app:generatedebugresources :app:mergedebugresources c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\refresh.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\wind.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\partly_cloudy.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\fog.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\clear_day.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\snow.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\partly_cloudy.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\degree.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\rain.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\sleet.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\snow.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\cloudy_night.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\clear_day.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\clear_day.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\sleet.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\clear_night.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\snow.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\sunny.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\cloudy.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\fog.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\bg_temperature.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\partly_cloudy.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\wind.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\clear_night.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\refresh.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\cloudy.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\degree.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\snow.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\ic_launcher.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\fog.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\cloudy_night.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\refresh.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\rain.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\sunny.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\degree.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\clear_night.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\ic_launcher.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\wind.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\clear_night.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\bg_temperature.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\clear_day.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\ic_launcher.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\cloudy_night.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\bg_temperature.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\sleet.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\wind.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\fog.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\degree.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\cloudy.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\rain.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\rain.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\sunny.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xhdpi\sleet.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-hdpi\cloudy_night.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\sunny.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\cloudy.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\bg_temperature.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\ic_launcher.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-mdpi\partly_cloudy.png: libpng warning: iccp: not recognizing known srgb profile has been edited c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\res\drawable-xxhdpi\refresh.png: libpng warning: iccp: not recognizing known srgb profile has been edited :app:processdebugmanifest :app:processdebugresources :app:generatedebugsources :app:compiledebugjava c:\users\andreas\documents\dreday creative\treehouse\stormy\app\src\main\java\com\dredaydesigns\stormy\adapters\houradapter.java error:(32, 15) error: cannot find symbol method bindhour(hour) note: input files use or override deprecated api. note: recompile -xlint:deprecation details. error:execution failed task ':app:compiledebugjava'. > compilation failed; see compiler error output details. information:build failed information:total time: 1 mins 56.274 secs information:2 errors information:0 warnings information:see complete output in console 

the standard have:

public class houradapter extends recyclerview.adapter<houradapter.hourviewholder> 

then method signatures become:

public hourviewholder oncreateviewholder(viewgroup parent, int viewtype) public void onbindviewholder(hourviewholder holder, int position) 

no casting needed.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -