android / codelab-android-room-with-a-view

Apache License 2.0
746 stars 490 forks source link

Unresolved reference: kotlin_version #258

Open AnandDangwal opened 3 months ago

AnandDangwal commented 3 months ago

"buildscript { ext.kotlin_version = '1.5.31'

...

} ext { activityVersion = '1.4.0' appCompatVersion = '1.4.0' constraintLayoutVersion = '2.1.2' coreTestingVersion = '2.1.0' coroutines = '1.5.2' lifecycleVersion = '2.4.0' materialVersion = '1.4.0' roomVersion = '2.3.0' // testing junitVersion = '4.13.2' espressoVersion = '3.4.0' androidxJunitVersion = '1.1.3' }"

Inside buildscript block it is showing an error which is "Unresolved reference: kotlin_version" , I don't know why. Same error is showing in the 'ext' block "Unresolved reference" for all variable . But I have solved by changing androidxJunitVersion = '1.1.3' to var androidxJunitVersion = "1.1.3" for each variable. When I resolved the unresolved reference error then It is showing me <Variable 'appCompatVersion' is never used > this is showing for each variable in the 'ext' block.

AnandDangwal commented 3 months ago

These are the screen shot of my build.gradle.kts(app) and buld.gradle.kts(project) file . I thought this might help you understand the problem. Screenshot 2024-03-08 210529 Screenshot 2024-03-08 210636