title: e: [kapt] An exception occurred: java.lang.IllegalArgumentException: intcannot be converted to an Element
body: <p>I am trying to implement Room in my android application. I am trying to get data from API and save them in local database. But when I run the application this error occurred</p>
  <blockquote>
  <p>e: [kapt] An exception occurred: java.lang.IllegalArgumentException:
  intcannot be converted to an Element</p>
  </blockquote>
  <p>This is my database class:</p>
  <pre><code>@Database(entities = [
      (User::class)],
          version = 1, exportSchema = false)
  abstract class UserDatabase : RoomDatabase() {
  
  
      abstract fun userDao(): UserDao
  
      companion object {
  
          @Volatile
          private var INSTANCE: UserDatabase? = null
  
          fun getDatabase(context: Context): UserDatabase {
  
              if (INSTANCE == null){
                  synchronized(this){
                      INSTANCE = Room.databaseBuilder(
                              context.applicationContext,
                              UserDatabase::class.java,
                              &quot;user_database&quot;)
                              .build()
                  }
              }
              return INSTANCE!!
          }
      }
  
  
  }
  
  </code></pre>
  <p>This is my Repository:</p>
  <pre><code>class Repository(application: Application) {
  
  
      private var mUserDao: UserDao
  
  init {
          val db = UserDatabase.getDatabase(application)
  
  
      }
      @WorkerThread
      fun createUser(user: User) {
          mUserDao.createUser(user)
      }
  
      @WorkerThread
      fun deleteUser(id: Int) {
          mUserDao.deleteUser(id)
      }
  
      @WorkerThread
      fun getUser(id: Int) {
          mUserDao.getUser(id)
      }
  
  </code></pre>
  <p>And here is my userDao</p>
  <pre><code>@Dao
  interface UserDao{
  
      @Insert(onConflict = OnConflictStrategy.REPLACE)
      fun createUser(user: User)
  
      @Delete
      fun deleteUser(int: Int)
  
      @Query(&quot;SELECT * FROM user WHERE user_id = :userID&quot;)
      fun getUser(userID: Int): LiveData&lt;User&gt;
  
  }
  
  </code></pre>
  <p>My LogginViewModel:</p>
  <pre><code>class LoginViewModel(application: Application) : AndroidViewModel(application) {
  
      var repository: Repository = Repository(application)
  
  
      fun createUser(user: User) = repository.createUser(user)
  
  }
  
  </code></pre>
  <p>Also this error get occurred:</p>
  <blockquote>
  <p>org.gradle.api.tasks.TaskExecutionException: Execution failed for task
  ':app:kaptDebugKotlin' &lt;30 internal calls&gt; at
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)&lt;1
  internal call&gt;    at java.lang.Thread.run(Thread.java:745) Caused by:
  org.gradle.api.GradleException: Compilation error. See log for more
  details   at
  org.jetbrains.kotlin.gradle.tasks.TasksUtilsKt.throwGradleExceptionIfError(tasksUtils.kt:16)
  at
  org.jetbrains.kotlin.gradle.internal.KaptWithKotlincTask.compile(KaptWithKotlincTask.kt:79)&lt;17
  internal calls&gt; ...33 more</p>
  </blockquote>