UnsupportedOperationException with DriverManager.getConnection() on Android

后端 未结 2 1788
广开言路
广开言路 2020-12-04 00:59

I am unable to connect JDBC to my database, getting following error

Error :  E/AndroidRuntime: FATAL EXCEPTION: main
 Process: com.example.myprojectapplicati         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 01:52

    Probably means that the msql driver information in your configuration does not match the load driver in your code. The high version of the mysql driver registration, try to use this method: Class.forName("com.mysql.cj.jdbc.Driver");

提交回复
热议问题