title: Android room failed to open database
body: <p>It crashes when queried from room dao. Does anyone have ideas?
  It work well on nexus 5 android 6.0, but crashes on nokia 8 android 8.1</p>
  
  <pre><code>06-23 01:19:02.469 2652-2729/com.aaa.bbb E/SQLiteLog: (14) cannot open file at line 35807 of [605907e73a]
      (14) os_unix.c:35807: (21) open(/data/user/0/com.aaa.bbb/files) - 
  06-23 01:19:02.472 2652-2729/com.aaa.bbb E/SQLiteDatabase: Failed to open database '/data/user/0/com.aaa.bbb/files'.
      android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database
          at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
          at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:210)
          at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:194)
          at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:493)
          at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:200)
          at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:192)
          at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:864)
          at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:849)
          at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:724)
          at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:714)
          at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:295)
          at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:238)
          at android.arch.persistence.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:96)
          at android.arch.persistence.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:54)
          at android.arch.persistence.room.RoomDatabase.query(RoomDatabase.java:233)
          at com.aaa.bbb.manager.db.CityAreaDao_Impl$4.compute(CityAreaDao_Impl.java:229)
          at com.aaa.bbb.manager.db.CityAreaDao_Impl$4.compute(CityAreaDao_Impl.java:215)
          at android.arch.lifecycle.ComputableLiveData$2.run(ComputableLiveData.java:100)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
          at java.lang.Thread.run(Thread.java:764)
  </code></pre>
  
  <p>------------------- The DB Manager -------------------</p>
  
  <pre><code>@Database(entities = [(EMCityArea::class)], exportSchema = false, version = 1)
  private abstract class EMDataBase : RoomDatabase() {
      abstract fun cityAreakDao():CityAreaDao
  }
  
  class EMDBManager private constructor(){
      companion object {
          val share: EMDBManager by lazy { EMDBManager() }
      }
  
      private val db = Room.databaseBuilder(App.applicationContext(), EMDataBase::class.java,"dbfile.db").build()
  
      val cityAreaDao:CityAreaDao
          get() = db.cityAreakDao()
  
      fun allCountry():LiveData&lt;List&lt;EMCityArea&gt;&gt;{
          return cityAreaDao.allCounty()
      }
  }
  </code></pre>
  
  <p>------------------- Query -------------------</p>
  
  <pre><code>EMDBManager.share.allCountry().observe(this, Observer {coutryItems -&gt;
      if (coutryItems == null){return@Observer}
      mCountryAdapter.clear()
      mCountryAdapter.addAll(coutryItems.mapNotNull { it.name })
      mCountryAdapter.notifyDataSetChanged()
  })
  </code></pre>