I was coding in android studio then this error will appear:
cannot resolve symbol 'R'
Error:Execution failed for task ':demo:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\Android Development\sdk\android-sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
this is my Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "br.liveo.ndrawer"
minSdkVersion 21
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile project(':library')
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:design:22.2.0'
compile 'com.android.support:appcompat-v7:22.2.0'
}
I use Android Studio V 1.0 , all API 22 and API 21 and Tools and Extras of SDK Manager are updated.
this options not working:
File/ Invalidate Cashes/Restart
Build/ Rebuild Project
Build/ Clean Project
what should I do know?
tnx
I solve my problem:
1) check all your XML files for given unknown src. ImageView or ImageButton or any think, et:
android:src="@drawable/cards"
then
Build/ Rebuild Project
or
Build/ Clean Project
or
File/ Invalidate Cashes/Restart
Your problem will solve for sure 100% :D
This error can be raised because of duplicate resources/files. To find out the names and path of duplicate resources:
Go to File > Settings > Build, Execution, Deployment. Select Compiler from sub-options.
Type --debug against Command-line Options. Press Ok.
Hope it helps!
I found a solucion problem was because I add 2 image one in drawable and other one in drawable-es but in this last the name was (same than drawable for example myimagen.jpg) but the extencion was in uppercase
in drawable this was myimagen.jpg and drawable-es it was myimagen.JPG
I rebuild, clean, and rebuild, re-start android studio, re-start my pc and it did not work, then I thoungh my be the name because my error say "processdebugresources"
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\auc\AppData\Local\Android\sdk\build-tools\23.0.1\aapt.exe'' finished with non-zero exit value 1
I was compiling with build version 23.0.2 and realized 23.0.3 was available in the Android SDK. Installed the newer version, changed build version in build.gradle, and Android build worked after that.
Should also note that this error didn't start happening until I changed my splash screen images to 9-patch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With