title: Cannot inherit from final 'com.example.mycountryapp.databinding.FragmentFeedBinding' and 'FragmentFeedBinding()' has private access in
body: <p>Feed Fragment</p>
  <pre><code>class FeedFragment : Fragment() {
  private lateinit var viewModel : FeedViewModel
  private val countryAdapter = CountryAdapter(arrayListOf())
  
  override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
  
  }
  
  override fun onCreateView(
      inflater: LayoutInflater, container: ViewGroup?,
      savedInstanceState: Bundle?
  ): View? {
      // Inflate the layout for this fragment
      return inflater.inflate(R.layout.fragment_feed, container, false)
  
  
  }
  
  override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
      super.onViewCreated(view, savedInstanceState)
  
      viewModel = ViewModelProvider(this).get(FeedViewModel::class.java)
      viewModel.refreshData()
  
      countryList.layoutManager = LinearLayoutManager(context)
      countryList.adapter = countryAdapter
  
      observeLiveData()
  }
  private fun observeLiveData() {
      viewModel.countries.observe(viewLifecycleOwner, Observer { countries-&gt;
          countries?.let {
              countryList.visibility=View.VISIBLE
              countryAdapter.updateCountryList(countries)
          }
      })
      viewModel.countryError.observe(viewLifecycleOwner, Observer { error-&gt;
          error?.let {
              if(it) {
                  countryerror.visibility = View.VISIBLE
              } else {
                  countryerror.visibility = View.GONE
              }
          }
      })
      viewModel.countryLoading.observe(viewLifecycleOwner, Observer { loading-&gt;
          loading?.let {
              if (it) {
                  countryLoading.visibility = View.VISIBLE
                  countryList.visibility = View.GONE
                  countryerror.visibility = View.GONE
              } else {
                  countryLoading.visibility = View.GONE
              }
          }
      })
  
  }
  </code></pre>
  <p>}</p>
  <p>my Country Fragment</p>
  <pre><code>class CountryFragment : Fragment() {
  private var countryUuid = 0
  override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
  }
  
  override fun onCreateView(
      inflater: LayoutInflater, container: ViewGroup?,
      savedInstanceState: Bundle?
  ): View? {
      // Inflate the layout for this fragment
      return inflater.inflate(R.layout.fragment_country, container, false)
  
  }
  override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
      super.onViewCreated(view, savedInstanceState)
      arguments?.let {
          countryUuid = CountryFragmentArgs.fromBundle(it).countryUuid
      }
  }
  </code></pre>
  <p>}</p>
  <p>my feed viewmodel</p>
  <pre><code>class FeedViewModel : ViewModel() {
  val countries = MutableLiveData&lt;List&lt;Country&gt;&gt;()
  val countryError = MutableLiveData&lt;Boolean&gt;()
  val countryLoading = MutableLiveData&lt;Boolean&gt;()
  
  fun refreshData() {
  
      val country = Country(&quot;Turkey&quot;,&quot;Asia&quot;,&quot;Ankara&quot;,&quot;TRY&quot;,&quot;Turkish&quot;,&quot;www.ss.com&quot;)
      val country2 = Country(&quot;France&quot;,&quot;Europe&quot;,&quot;Paris&quot;,&quot;EUR&quot;,&quot;French&quot;,&quot;www.ss.com&quot;)
      val country3 = Country(&quot;Germany&quot;,&quot;Europe&quot;,&quot;Berlin&quot;,&quot;EUR&quot;,&quot;German&quot;,&quot;www.ss.com&quot;)
  
      val countryList = arrayListOf&lt;Country&gt;(country,country2,country3)
  
      countries.value = countryList
      countryError.value = false
      countryLoading.value = false
  }
  </code></pre>
  <p>}</p>
  <p>I am getting this error in java(generated)-&gt; data binding-&gt;fragmentCountryBinding, fragmentFeed Binding, fragmentItemBinding parts of the application. I don't know how to solve this problem, I made databinding true in gradle.build part, but I am still facing these problems, if you know how to solve it and help me I would be very grateful.
  Error is Cannot inherit from final 'com.example.mycountryapp.databinding.FragmentFeedBinding'
  second error 'FragmentCountryBinding()' has private access in 'com.example.mycountryapp.databinding.FragmentCountryBinding'</p>
  <p>_
  [This my CountryFragment.xml][1]
  [1]: https://i.stack.imgur.com/IkrL5.png</p>
  <pre><code>        &lt;TextView
          android:id=&quot;@+id/countryCapital&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_below=&quot;@id/countryName&quot;
          android:text=&quot;Country Capital&quot;
          android:textSize=&quot;16sp&quot;
          android:layout_centerHorizontal=&quot;true&quot;
          android:layout_margin=&quot;7dp&quot;&gt;
  
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id=&quot;@+id/countryRegion&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_below=&quot;@id/countryCapital&quot;
          android:text=&quot;Country Region&quot;
          android:textSize=&quot;16sp&quot;
          android:layout_centerHorizontal=&quot;true&quot;
          android:layout_margin=&quot;7dp&quot;&gt;
  
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id=&quot;@+id/countryCurrency&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_below=&quot;@id/countryRegion&quot;
          android:text=&quot;Country Currency&quot;
          android:textSize=&quot;16sp&quot;
          android:layout_centerHorizontal=&quot;true&quot;
          android:layout_margin=&quot;7dp&quot;&gt;
  
      &lt;/TextView&gt;
  
      &lt;TextView
          android:id=&quot;@+id/countryLanguage&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_below=&quot;@id/countryCurrency&quot;
          android:text=&quot;Country Language&quot;
          android:textSize=&quot;16sp&quot;
          android:layout_centerHorizontal=&quot;true&quot;
          android:layout_margin=&quot;7dp&quot;&gt;
  
      &lt;/TextView&gt;
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>