Grade finished with non-zero exit value 1 - android

I have updated Android Studio and got some trouble with my project.
The console gives me the following error message:
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/Martin/Library/Android/sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1
My Gradle file looks marked like that and I do not know why..
under Android Studio->Preferences->Schemas and DTDs
I have added the path
http://schemas.android.com/apk/res/android
to the ignoring list.
So the red highlighting of the path appeared to be black again but
the rest of the issues kept being...
My Gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.stack.overflow"
minSdkVersion 19
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:recyclerview-v7:22.1.1'
compile 'com.android.support:cardview-v7:22.0.+'
compile 'com.afollestad:material-dialogs:0.7.5.2'
}
What could I else do to fix my AndroidManifest.xml?

Related

Error in compile SDK version?

Can anyone please tell me how do i fix this error:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '21.1.2'
defaultConfig {
applicationId "com.example.abhishek.detector"
minSdkVersion 10
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.google.android.gms:play-services-location:8.1.0'
}
Error:
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\hp-pc\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1
Install the latest version of the build tools. Adjust your build.gradle to use
`buildToolsVersion "23.0.2"`
or check and remove duplicate dependencies from list.
Enjoy :)
Change the sdk version from the values/string.xml

Execution fails when i try to build my project

Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 2
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.sharu.places"
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'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-nearby:8.4.0'
compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5.1'
compile 'com.android.support:multidex:1.0.1'
}
Please help me with this problem.Thanks in advance.
This happens quite frequently.
Just "Clean the project" -> "Rebuild the project", and you will be good to go.

Error:Execution failed for task ':app:dexDebug' after dependency is placed correctly

My studio keeps giving this error:
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
however I have gone through questions and i have arranged my grade file as I need to, but the error would not leave.
This is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
applicationId "com.apppartner.androidprogrammertest"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'com.loopj.android:android-async-http:1.4.9'
}
what else would i need to do???

Error:Execution failed for task ':app:dexDebug'.

I'm having this error.
Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_51\bin\java.exe'' finished with non-zero exit value 2
here is my build.gradle file.
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.ankit.myapplication"
minSdkVersion 10
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'])
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.google.android.gms:play-services:8.1.0'
compile files('libs/volley.jar')
}
Add multiDexEnabled true in your defaultConfig
defaultConfig {
// Enabling multidex support.
multiDexEnabled true
}
OR
Gradle Build failed with an exception : java.exe' finished with non-zero exit value 2

For importing Scribe OAuth library on android, build.gradle built successfully but throwing error on running the app

I have put scribe-1.3.7.jar file on my libs folder and
I have this build.gradle file to import Scribe OAuth library -
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "app.example.com.scribetest"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'org.scribe:scribe:1.3.7'
The build.gradle file is building successfully but on running the app its showing an error -
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_05\bin\java.exe'' finished with
non-zero exit value 1
Whats wrong in the build.gradle ?

Categories

Resources