zxc986506375 2019-11-04 14:58 采纳率: 0%
浏览 923

android studio连接mysql数据库报错,请问这是那里的问题?

我用android studio 连接mysql数据库,用的是从maven上下载的JDBC包。但是点击运行后它提示:
AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): com.mysql.cj.protocol.Message com.mysql.cj.interceptors.QueryInterceptor.postProcess(com.mysql.cj.protocol.Message, com.mysql.cj.protocol.Message)","sources":[{}],"tool":"D8"}

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeExtDexDebug'.

    Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
    Failed to transform file 'mysql-connector-java-8.0.11.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=15, org.gradle.usage=java-runtime-jars}
    Execution failed for DexingTransform: D:\Anzhuo-SDK\android project\app\libs\mysql-connector-java-8.0.11.jar.
    > Error while dexing.
    Failed to transform file 'mysql-connector-java-8.0.11.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=15, org.gradle.usage=java-runtime-jars}
    Execution failed for DexingTransform: D:\Anzhuo-SDK\android project\app\libs\mysql-connector-java-8.0.11.jar.
    > Error while dexing.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 19s
我想问一下,这是为什么?是因为JAR的版本问题吗?

  • 写回答

1条回答

  • dabocaiqq 2019-11-04 15:43
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#java#的问题,请各位专家解答!
  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥30 求解达问题(有红包)
  • ¥15 请解包一个pak文件