I am trying to connect to a database with Java from Android Studio.
When I create a brand new empty project and run it, the project runs fine. As soon as I paste mysql-connector-java-5.1.38-bin into the lib directory (app/lib) and then try to run the project, I get 2 errors.
Error:com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_74\bin\java.exe'' finished with non-zero exit value 1
I've also tried adding it as a dependency but I didn't think I needed to because {include=[*.jar], dir=libs} is already in the dependency list.
Thanks for reading