2

I try to add JDBC driver as a dependency in an Android project with use of Gradle.

dependencies {
    compile 'com.android.support:support-v4:18.0.0'
    compile 'mysql:mysql-connector-java:5.1.+'
}

I got error message

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_101\bin\java.exe'' finished with non-zero exit value 1

I thought, that this is a memory problem, so tried to add code to build.gradle.

dexOptions {
    javaMaxHeapSize "4g"
}

Nothing changed, same message again. compileSdkVersion is 18.

appkovacs
  • 97
  • 1
  • 1
  • 9
  • JDBC is not designed to use in android. Use a web service for your connection...see here: http://codeoncloud.blogspot.de/2012/03/android-mysql-client.html – Opiatefuchs Nov 03 '16 at 20:57
  • 2
    Please read: http://stackoverflow.com/questions/15853367/jdbc-vs-web-service-for-android – Morrison Chang Nov 03 '16 at 21:41

0 Answers0