Error on connecting mariaDB in android Studio

时间:2017-12-18 06:47:10

标签: java android mariadb connect

I'm tring to connect my AndroidStudio app to a mariaDb but, after reading this post: Connect mariaDB in Java

I tried it at home... but when I execute

conn = DriverManager.getConnection(

I have this Exception signaled on Android Studio console:

I/System.out: Connecting to a selected database...
I/dalvikvm: Could not find method org.slf4j.LoggerFactory.getLogger, referenced from method org.mariadb.jdbc.internal.logging.LoggerFactory.getLogger
W/dalvikvm: VFY: unable to resolve static method 27500: Lorg/slf4j/LoggerFactory;.getLogger (Ljava/lang/Class;)Lorg/slf4j/Logger;
D/dalvikvm: VFY: replacing opcode 0x71 at 0x000e
W/dalvikvm: VFY: unable to resolve static field 13416 (UTF_8) in Ljava/nio/charset/StandardCharsets;
D/dalvikvm: VFY: replacing opcode 0x62 at 0x0022
W/dalvikvm: VFY: unable to resolve static field 13416 (UTF_8) in Ljava/nio/charset/StandardCharsets;
D/dalvikvm: VFY: replacing opcode 0x62 at 0x005d
W/dalvikvm: VFY: unable to resolve static field 13416 (UTF_8) in Ljava/nio/charset/StandardCharsets;
D/dalvikvm: VFY: replacing opcode 0x62 at 0x001f
W/dalvikvm: VFY: unable to resolve static field 13416 (UTF_8) in Ljava/nio/charset/StandardCharsets;
D/dalvikvm: VFY: replacing opcode 0x62 at 0x0042
W/dalvikvm: VFY: unable to resolve static field 13416 (UTF_8) in Ljava/nio/charset/StandardCharsets;
D/dalvikvm: VFY: replacing opcode 0x62 at 0x0004
I/dalvikvm: DexOpt: unable to optimize static field ref 0x3468 at 0x28 in Lorg/mariadb/jdbc/internal/protocol/AbstractQueryProtocol;.handleStateChange
W/dalvikvm: VFY: unable to resolve static field 13416 (UTF_8) in Ljava/nio/charset/StandardCharsets;
D/dalvikvm: VFY: replacing opcode 0x62 at 0x0003
I/dalvikvm: DexOpt: unable to optimize static field ref 0x3468 at 0x0e in Lorg/mariadb/jdbc/internal/protocol/AbstractConnectProtocol;.<clinit>
W/dalvikvm: Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lorg/mariadb/jdbc/internal/protocol/AbstractConnectProtocol;
W/jdwp: Debugger is telling the VM to exit with code=-1
I/dalvikvm: GC lifetime allocation: 19457 bytes
Disconnected from the target VM, address: 'localhost:8600', transport: 'socket'

I'm new to DB interfacing, do you have an idea on what's going wrong?? Thank's a lot

0 个答案:

没有答案