无法解析文件highlighted_text_material.xml

时间:2016-03-21 15:44:23

标签: android android-studio

我运行应用程序并且每次都遇到此问题。我一开始就试图解决这个问题,它表示其他失败的失败并且我已将Android版本更改为

  

API 21:Android API 21

渲染并得到此错误。

Failed to parse file
C:..\AppData\Local\Android\sdk\platforms\android-23\data\res\color\highlighted_text_material.xml

highlighted_text_material.xml如下所示

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:alpha="0.4"
          android:color="?attr/colorAccent" />
</selector>

有没有人遇到同样的问题?

1 个答案:

答案 0 :(得分:2)

如果你看到路径C:..\AppData\Local\Android\sdk\platforms\android-23\data\res\color\highlighted_text_material.xml,它正在使用android-23,所以你可能需要将api更改为23并尝试编译。