0

I've just started learning android. I've build the sample app according to the training provided by the developer training on the android developer training guide. I've started with my own app but for some reason it gives me this error with all instances of R. when I try to clean the error remains, i've been through quite a few of the solutions provided to others, but none of them work for me.

heres the error message from the gradle:

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

com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Program Files (x86)\Android\android-studio\sdk\build-tools\21.0.0\aapt.exe package -f --no-crunch -I C:\Program Files (x86)\Android\android-studio\sdk\platforms\android-21\android.jar -M C:\Users...Projects\android app\MyAppName\app\build\intermediates\manifests\debug\AndroidManifest.xml -S C:\Users...\Projects\android app\MyAppName\app\build\intermediates\res\debug -A C:\Users...\Projects\android app\MyAppName\app\build\intermediates\assets\debug -m -J C:\Users...\Projects\android app\MyAppName\app\build\generated\source\r\debug -F C:\Users...\Projects\android app\MyAppName\app\build\intermediates\libs\app-debug.ap_ --debug-mode --custom-package domain.MyAppName -0 apk --output-text-symbols C:\Users...\Projects\android app\MyAppName\app\build\intermediates\symbols\debug Error Code: -1073741819

Any help is appreciated.

user1620802
  • 73
  • 2
  • 11
  • did you try to check in layout? when detect error in layout(Main,String,xml..), the android is going to remove 'R' until you success done all fix. – kemdo Oct 26 '14 at 08:50
  • I've checked and rechecked, nothing in the xml has any errors, I've recreated it and left just the skeleton created by the studio and the error is still there. – user1620802 Oct 26 '14 at 19:06
  • oh god.... When i am new in Android, I have faced some problem with 'R' and I could not solve it, this time was terrible. I can not solve your problem with a few infomation like that. So you can go to here: [chat stack](www.chat.stackoverflow.com) and go Android room. You post you question link here, may be some people who have experience will go to help you, my friend – kemdo Oct 27 '14 at 07:35

2 Answers2

0

You have to restart Android Studio, and perform an graddle sync,(maybe restart your PC) should work then. Ran into this quite often, think it's a bug.

0

I dont know what the problem was, I tried a few of the solutions provided here: Execution failed app:processDebugResources Android Studio

None of them worked though. i just reinstalled Android Studio and did not update any of the build tools and its working fine now.

Community
  • 1
  • 1
user1620802
  • 73
  • 2
  • 11