• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Android Studio - does not resolve to a valid reference in the project

I've completed the demo at
successfully. Well done by Philipp Lackner.

When I attempted to do it a second time to capture better notes, it fails when trying to resolve a layout item while creating a function in the adapter code.

The successful version of the adapter code somehow added this line, which appears to enable the layout id resolution:
import kotlinx.android.synthetic.main.time_series.view.*

Pasting that line into the version of the adapter does not resolve.

Is there a way to tell the interpreter/compiler that an id/item is in a specific (layout) file?

Thanks in advance!
 
I've completed the demo at
successfully. Well done by Philipp Lackner.

When I attempted to do it a second time to capture better notes, it fails when trying to resolve a layout item while creating a function in the adapter code.

The successful version of the adapter code somehow added this line, which appears to enable the layout id resolution:
import kotlinx.android.synthetic.main.time_series.view.*

Pasting that line into the version of the adapter does not resolve.

Is there a way to tell the interpreter/compiler that an id/item is in a specific (layout) file?

Thanks in advance!

Oops - he had posted a solution in the comments... My bad.
 
Back
Top Bottom