java.lang.RuntimeException: Unable to start service com.entitcs.office_attendance.model_classes.GPSTracker@41b6c7a with Intent { cmp=com.entitcs.office_attendance/.model_classes.GPSTracker }: android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a readonly database (code 776): , while compiling: PRAGMA cache_size ################################################################# Error Code : 776 (SQLITE_READONLY_ROLLBACK) Caused By : Failed to execute ROLLBACK due to Database file was Read-Only (attempt to write a readonly database (code 776): , while compiling: PRAGMA cache_size) ################################################################# at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3696) at android.app.ActivityThread.-wrap21(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1801) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6944) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) Caused by: android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a readonly database (code 776): , while compiling: PRAGMA cache_size ################################################################# Error Code : 776 (SQLITE_READONLY_ROLLBACK) Caused By : Failed to execute ROLLBACK due to Database file was Read-Only (attempt to write a readonly database (code 776): , while compiling: PRAGMA cache_size) ################################################################# at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1096) at android.database.sqlite.SQLiteConnection.executeForLong(SQLiteConnection.java:755) at android.database.sqlite.SQLiteConnection.setCacheSizeFromConfiguration(SQLiteConnection.java:395) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:279) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:205) at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:649) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:255) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:222) at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:1191) at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:1146) at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:861) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:265) at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:218) at com.entitcs.office_attendance.f.a.h(Unknown Source:0) at com.entitcs.office_attendance.model_classes.GPSTracker.s(Unknown Source:69) at com.entitcs.office_attendance.model_classes.GPSTracker.(Unknown Source:44) at com.entitcs.office_attendance.model_classes.GPSTracker.onStartCommand(Unknown Source:6) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3679) ... 8 more