diff options
author | Tor Norbye <tnorbye@google.com> | 2012-11-02 08:00:47 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2012-11-02 08:00:47 -0700 |
commit | 024076c32fe33d951b6bc89f064f2da85985693f (patch) | |
tree | f6c19d1faa98b5aab8ed9b139d8145f4b4eb16ed /sdk_common | |
parent | 72eb6932b995d9627afd2659e9567ad84918047e (diff) | |
download | sdk-024076c32fe33d951b6bc89f064f2da85985693f.zip sdk-024076c32fe33d951b6bc89f064f2da85985693f.tar.gz sdk-024076c32fe33d951b6bc89f064f2da85985693f.tar.bz2 |
39213: Refreshing resources fails with "Error: name expected"
Change-Id: I6cfe252a830e55da5135b17964fc746db2de8964
Diffstat (limited to 'sdk_common')
-rw-r--r-- | sdk_common/src/com/android/ide/common/resources/SingleResourceFile.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sdk_common/src/com/android/ide/common/resources/SingleResourceFile.java b/sdk_common/src/com/android/ide/common/resources/SingleResourceFile.java index eb643f6..8e394d3 100644 --- a/sdk_common/src/com/android/ide/common/resources/SingleResourceFile.java +++ b/sdk_common/src/com/android/ide/common/resources/SingleResourceFile.java @@ -16,12 +16,15 @@ package com.android.ide.common.resources; +import static com.android.SdkConstants.DOT_XML; + import com.android.ide.common.rendering.api.DensityBasedResourceValue; import com.android.ide.common.rendering.api.ResourceValue; import com.android.ide.common.resources.configuration.DensityQualifier; import com.android.io.IAbstractFile; import com.android.resources.FolderTypeRelationship; import com.android.resources.ResourceType; +import com.android.utils.SdkUtils; import java.util.Collection; import java.util.List; @@ -150,8 +153,8 @@ public class SingleResourceFile extends ResourceFile { * @return true if parsing succeeds and false if it fails */ private boolean validateAttributes(ScanningContext context) { - // We only need to check if it's a non-framework file - if (!isFramework()) { + // We only need to check if it's a non-framework file (and an XML file; skip .png's) + if (!isFramework() && SdkUtils.endsWith(getFile().getName(), DOT_XML)) { ValidatingResourceParser parser = new ValidatingResourceParser(context, false); try { IAbstractFile file = getFile(); |