简体   繁体   中英

Android. ActiveJDBC possible?

Official web site says that library supports SQLite 3. Android has SQLite. Is it possible to use JavaLite's ActiveJDBC in Android Studio project?

Website says that conenction is made like this:

   Base.open("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/test", "the_user", "the_password");
   Employee.findAll().dump();
   Base.close();

In the case of Android, how to connect library to SQLite database?

According to this: http://developer.android.com/reference/java/sql/package-summary.html , there is JDBC support on Android now, but if you take a look at this: http://developer.android.com/reference/java/sql/DriverManager.html it states: "...Android does not include any JDBC drivers by default; you must provide your own."

Quick googling for Android SQLite JDBC drivers brought up some dead projects, so I assume this not possible simply because there are no drivers available. The framework itself would probably work if there was a driver.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM