Error in compile SDK version? - android

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

Related

Android : Error:Execution failed for task ':app:processDebugResources' exit with non-Zero Value 1

Am getting error when I rebuild the project. After I add the dependency for the google Map V2 this error occur.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:
Process 'command 'C:\Users\Binil\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
I tried to clean the project and rebuild the project but same issue occur again. Also I try sync the project but not solved
compile 'com.google.android.gms:play-services:8.4.0'
When I remove this dependency then app build successfully.
Gradle.build
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.android4dev.navigationview"
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.0'
compile 'com.android.support:design:22.2.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.google.android.gms:play-services:8.4.0'
}
Can any one please help me.
Add this with-in android tag to your module build.gradle:
dexOptions {
javaMaxHeapSize "4g"
}
Also, if you only want to use maps try to add this
compile 'com.google.android.gms:play-services-maps:8.4.0'
Instead of
compile 'com.google.android.gms:play-services:8.4.0'
Add apply plugin com.google.gms.google-services after dependencies
dependencies
{
compile 'com.google.android.gms:play-services:8.4.0'
}
apply plugin: 'com.google.gms.google-services'

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.

Grade finished with non-zero exit value 1

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?

Two libraries have same values.xml

I am making an Andoird app in which I have used many dependencies and I need all the dependencies.but an error has encountered stating that rippleColor has already been defined.
I have searched on the internet all I have found is that my dependencies have same name in values.xml.
Error1:-
Attribute "rippleColor" has already been defined
Error2:-
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\RANJEET JAIN\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
My gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "ranjeet.example.com.finance"
minSdkVersion 14
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.github.navasmdc:MaterialDesign:1.5#aar'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.parse:parse-android:1.10.2'
compile 'info.hoang8f:fbutton:1.0.5'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1#aar'
compile 'com.daimajia.androidanimations:library:1.1.3#aar'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:design:22.2.1'
}

gradle fails to compile app:dexDebug

When I compile I get an error about dexDebug that I can not solve. I am using the JSON-simple library, the jReddit library and the Apache Commons library. I have never seen this error before and have no idea how to fix it. Thanks in advance!
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "net.techredesign.uiforreddit"
minSdkVersion 21
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 group: 'com.github.jreddit', name: 'jreddit', version: '1.0.3'
compile "com.googlecode.json-simple:json-simple:1.1"
compile group: 'commons-io', name: 'commons-io', version: '2.0.1'
}
and here is the error:
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
Any help is greatly appreciated!!

Categories

Resources