【问题标题】:More than one file was found with OS independent path 'com/mysql/jdbc/configs/maxPerformance.properties'找到多个文件,其独立于操作系统的路径 'com/mysql/jdbc/configs/maxPerformance.properties'
【发布时间】:2019-07-23 17:49:45
【问题描述】:
More than one file was found with OS independent path 'com/mysql/jdbc/configs/maxPerformance.properties'

当我尝试在 Android Studio 中构建我的 gradle 时,我试图在我的项目中使用 MySQL 作为数据库

【问题讨论】:

标签: android mysql database-connection


【解决方案1】:

您将 mysql-connector-java 依赖项链接了两次。我建议通过以下方式链接依赖项:

implementation 'mysql:mysql-connector-java:5.1.45'

此依赖项可在 jcenter (https://bintray.com/bintray/jcenter/mysql:mysql-connector-java) 获得。

但是我不建议直接连接到 SQL 数据库。我宁愿写一个 REST 服务。 here解释了你不应该使用直接连接到数据库的原因。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多