0
In the execution of my project is occurring the error below and I have already searched in several places, but none fixed for my problem. I hope someone can help me.
I’ve restarted Android Studio and gave a Clean, but nothing worked.
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
build.Gradle ( app):
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.junior.fireflyapp"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'mysql:mysql-connector-java:5.1.37'
compile 'com.android.support:design:23.1.0'
}
build.Gradle ( project):
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
Good evening, edit the question and put the code on it, I recommend you read: http://answall.com/help/mcve
– Guilherme Nascimento
@Mauricio Junior, could you attach to your question the code of your
build.gradle (app)
andbuild.gradle (project)
? There is probably an error in any of these files.– regmoraes
I’ve been having the same problem for a few days. In fact, I saw many people with this error, and depending on the situation solve in different ways (clean and build the project, redefining the way and version of JDK, restarting Android Studio), but none of these worked for me. An option that I haven’t been able to test yet and I leave a hint is reinstall JDK, it’s one of the options that I saw that for some people solved, but I can’t test this at the moment. If you test this solution and it works, let me know so I can post the correct answer to your question.
– WyllianNeo
Already tried to give a BUILD > REBUILD
– PauloHDSousa
You already updated your Android Studio Gradle?
– Kleber Nunes
@Wyllianneo this issue of reinstalling the JDK tbm have not tested, as soon as possible I will perform the tests and put the result.
– Mauricio Junior
@regmoraes posted the code of my files Gradle.
– Mauricio Junior
Can anyone help me as to the reason for this mistake? I have tried suggestions from the people who sent here, but it came to nothing.
– Mauricio Junior
The error was caused by this line: Compile 'mysql:mysql-Connector-java:5.1.37' I removed it and the project of my app worked, but isn’t it necessary for the app to connect to my database? Someone would know to tell me why she was eavesdropping?
– Mauricio Junior