1. Are you ready for the Galaxy S20? Here is everything we know so far!

Cannot find symbol class class

Discussion in 'Android Development' started by Kevil, Sep 26, 2020.

  1. Kevil

    Kevil Lurker
    Thread Starter

    I am finishing with the example Android application Real Estates on Mars. It was running well until

    4) Task: Display a grid of images with RycyclerView

    step 9. In MarsPropertyViewHolder, create a bind() method that takes a MarsProperty object as an argument and sets binding.property to that object. Call executePendingBindings() after setting the property, which causes the update to execute immediately.

    see link here

    I think I did it correctly:

    class MarsPropertyViewHolder(private var binding:
    GridViewItemBinding):
    RecyclerView.ViewHolder(binding.root){
    fun bind(marsProperty: MarsProperty) {
    binding.property = marsProperty
    binding.executePendingBindings()
    }
    }


    I am getting one error while compiling the code:

    cannot find symbol class class GridViewItemBindingImpl

    Any advice on how to fix it?
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Kevil

    Kevil Lurker
    Thread Starter

    Part of the code were missing, fixed and now it compiles flawlessly.
     
Loading...
Similar Threads - Cannot find symbol
  1. CiDefaid
    Replies:
    3
    Views:
    392
  2. Bob65
    Replies:
    1
    Views:
    846
  3. Janeire
    Replies:
    2
    Views:
    300
  4. Paolo Giovanelli
    Replies:
    0
    Views:
    511
  5. unet
    Replies:
    0
    Views:
    582
  6. tigerdxy
    Replies:
    5
    Views:
    566
  7. RVDowning
    Replies:
    7
    Views:
    1,344
  8. fret_wimp2
    Replies:
    2
    Views:
    1,078
  9. zepking
    Replies:
    5
    Views:
    1,504
  10. 3d1l
    Replies:
    9
    Views:
    921

Share This Page

Loading...