JDBC connection in Android

前端 未结 5 384
星月不相逢
星月不相逢 2020-11-30 08:52

Is there anyone who tried JDBC connection in android because in Android 2.3 JDBC is supported.

I have to connect with Mysql without web service.

I have made

5条回答
  •  旧时难觅i
    2020-11-30 09:22

    I've got the same error.

    Just adding this line to your gradle dependency resolves the error.

    compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.44'
    

    And you can change the version according to your need.

    After adding this, gradle sync will be taking care of everything, you just have to connect to DB in the same way as you do in simple java jdbc program. I've developed my app using the android studio.

提交回复
热议问题