When the Realm.writeCopyTo(File file) method is Realm.writeCopyTo(File file) , the following error occurs, and in Android versions other than 19, everything works fine.

 Caused by: io.realm.exceptions.RealmIOException: Failed to access: r at io.realm.internal.Group.nativeWriteToFile(Native Method) at io.realm.internal.Group.writeToFile(Group.java:226) at io.realm.internal.SharedGroupManager.copyToFile(SharedGroupManager.java:141) at io.realm.BaseRealm.writeEncryptedCopyTo(BaseRealm.java:254) at io.realm.Realm.writeEncryptedCopyTo(Realm.java:122) at io.realm.BaseRealm.writeCopyTo(BaseRealm.java:232) at io.realm.Realm.writeCopyTo(Realm.java:122) at com.vksafer.dv.vksafer.RealmExporter$1.doInBackground(RealmExporter.java:64) at com.vksafer.dv.vksafer.RealmExporter$1.doInBackground(RealmExporter.java:45) 

What could be the problem?

  • Check permissions to write / read in the manifest and clean the application data on the phone - it can help - YuriySPb

1 answer 1

The error was in the following, the ":" sign was present in the file name and because of it, everything did not work.