Issue
I have an issue which displays:
Error:(19, 29) No resource found that matches the given name
(at 'background' with value '@drawable/unpressed').
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException: Process 'command
'Drive:\Users\...\sdk\build-tools\23.0.1\aapt.exe'' finished with non-zero exit value 1
Basically I want to add background to an ImageButton which will change after OnTouch() Event. For that first of all, I have to add an Image (a simple scenario without an Event)
I am facing the above mentioned problem in a simple case. I don't know what mistake am I making. My code for ImageButton is:
<ImageButton
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/imageButton"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="202dp"
android:background="@drawable/unpressed"
/>
I have tried all of the solutions searched including:
Clean Solution
Rebuild Solution
Update SDK (mentioned in STACK Solution) Libraries
File > Invalidate Caches/Restart
After pasting image in
drawable, synchronized it.
As iGoda informed in the Comments. How can I find where the R settings exactly are changed?
Solution
After a long time, the problem solved by:
- deleting the files in the path:
C:\Users\UserName\AppData\Local\Temp If any of the folder in above path is not visible to you, kindly show the hidden files by going into the following Options in the menu bar of Windows Explorer:
Organize -> Folder and Search Options(For Windows-7)- Restart system and then check. It will all be fine.
Answered By - Asif Mehmood
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.