I'm trying to learn how to use the JDBC to connect a application to a MySQL database.
I'm using the Android Studio.
I downloaded "mysql-connector-java-5.1.37" from the MySQL website.
Just for put the "mysql-connector-java-5.1.37-bin.jar" in libs folder of a Hello World application and compile I receive :
Error:Execution failed for task ':app:preDexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe'' finished with non-zero exit value 1
the build.gradle:
apply plugin: 'com.android.application'
android {
    compileSdkVersion 23
    buildToolsVersion "22.0.1"
    defaultConfig {
        applicationId "br.com.myaplication.helloworld"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.0'
}
 
     
     
     
    