I was trying to store data in sqlite database in my JavaFX application running on Android, it works fine in desktop but when I deploy it on my Android device, this error shows up:
E/Database(24826): java.sql.SQLException: opening db: 'database.db': open failed: EROFS (Read-only file system)
E/Database(24826): at org.sqlite.core.CoreConnection.open(CoreConnection.java:201)
E/Database(24826): at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:74)
E/Database(24826): at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:24)
E/Database(24826): at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:23)
E/Database(24826): at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45)
E/Database(24826): at org.sqlite.JDBC.createConnection(JDBC.java:114)
E/Database(24826): at org.sqlite.JDBC.connect(JDBC.java:88)
E/Database(24826): at java.sql.DriverManager.getConnection(DriverManager.java:179)
E/Database(24826): at java.sql.DriverManager.getConnection(DriverManager.java:144)
E/Database(24826): at com.rameses.waterworks.database.Database.getConnection(Database.java:30)
E/Database(24826): at com.rameses.waterworks.database.Database.initTables(Database.java:40)
E/Database(24826): at com.rameses.Main.start(Main.java:28)
E/Database(24826): at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$144(LauncherImpl.java:863)
E/Database(24826): at com.sun.javafx.application.LauncherImpl$$Lambda$9.run(Unknown Source)
E/Database(24826): at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$157(PlatformImpl.java:326)
E/Database(24826): at com.sun.javafx.application.PlatformImpl$$Lambda$7.run(Unknown Source)
E/Database(24826): at com.sun.javafx.application.PlatformImpl.lambda$null$155(PlatformImpl.java:295)
E/Database(24826): at com.sun.javafx.application.PlatformImpl$$Lambda$19.run(Unknown Source)
E/Database(24826): at java.security.AccessController.doPrivileged(AccessController.java:52)
E/Database(24826): at com.sun.javafx.application.PlatformImpl.lambda$runLater$156(PlatformImpl.java:294)
E/Database(24826): at com.sun.javafx.application.PlatformImpl$$Lambda$6.run(Unknown Source)
E/Database(24826): at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
E/Database(24826): at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
E/Database(24826): at java.lang.Thread.run(Thread.java:841)
W/System.err(24826): Exception in Application start method
I/System.out(24826): QuantumRenderer: shutdown
W/System.err(24826): java.lang.reflect.InvocationTargetException
W/System.err(24826): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(24826): at java.lang.reflect.Method.invoke(Method.java:515)
W/System.err(24826): at javafxports.android.DalvikLauncher$1.run(DalvikLauncher.java:158)
W/System.err(24826): at java.lang.Thread.run(Thread.java:841)
W/System.err(24826): Caused by: java.lang.RuntimeException: Exception in Application start method
W/System.err(24826): at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
W/System.err(24826): at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$137(LauncherImpl.java:182)
W/System.err(24826): at com.sun.javafx.application.LauncherImpl$$Lambda$2.run(Unknown Source)
W/System.err(24826): ... 1 more
Here's the Android.xml:
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://ift.tt/nIICcg" package="com.rameses" android:versionCode="1" android:versionName="1.0">
<supports-screens android:xlargeScreens="true"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="21"/>
<application android:label="Waterworks" android:name="android.support.multidex.MultiDexApplication" android:icon="@mipmap/ic_launcher">
<activity android:name="javafxports.android.FXActivity" android:label="Waterworks" android:configChanges="orientation|screenSize">
<meta-data android:name="main.class" android:value="com.rameses.Main"/>
<meta-data android:name="debug.port" android:value="0"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
What do you think is the problem?
Aucun commentaire:
Enregistrer un commentaire