Issue
I am getting an error after modifying some of my xml resource files and I'm not quite sure how to fix it.
I was modifying my "main_activity.xml" layout file and went in to alter some text. Not wanting to hard code the values, I went in to create a "text style" by selecting my text, clicking "style" in the properties menu on the right hand page, then clicking the expand menu option to see all the available styles. This opened a "resources" dialog, these resources had resources like: "Base.TextAppearance.AppCompat.Body2" and "Theme.AppCompat.Light" (I'll put a screenshot of the dialog box below)
I saw a "new style button" and attempted to create a couple of styles named things like "txtSize_28sp" with a value of 28sp for the text sizes. I do know that at one time I did create resource that had a name and no value, most likely with the: "txtSize_28sp" name. Problem is after doing this it has messed with my gradle build and I can no longer compile or run my project. The "R" in my R.layout.activity_main is no longer resolving and I keep getting this error message:
C:\Users\Ethan\Dropbox\Development\Android\Projects\DontTapTheAd\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.1.1\res\values\values.xml
Error:(380, 5) String types not allowed (at 'txtSize_28sp' with value '').
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Ethan\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1
I have tried cleaning gradle, cleaning project, and syncing with gradle files. I can't find where to remove or fix my "txtSize_28sp" value.
Does anyone know how to fix this? Any help would be appreciated.
Solution
There are multiple values for different APIs so check all the multiple folders of values for different APIs like value-21, it must be in one of the other APIs values folder.
Answered By - Max
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.