I am trying to import the package needed to use this class : databaseBuilder.
The IDE correctly knows that I want to import this ; and offers the autoimport option - but it always stays greyed out at the top - unusable. The databaseBuilder in the code sits there in red - continually offering to import the same package.
I have tried invalidate cahce/restart to no avail.
Minimum code:
package com.lbaron.flyingweather
import androidx.room.Room.databaseBuilder
import androidx.room.RoomDatabase
abstract class TestClass : RoomDatabase(){
val instance = MetarDBItem.databaseBuilder(null, MetarDatabase::class.java,
"metar_database")
.build()
}
Thank you very much
question from:
https://stackoverflow.com/questions/65851421/import-needed-to-implement-class-remains-greyed-out-at-top-of-file-not-usable 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…