2016-03-21 42 views
3

我每次運行應用程序都會遇到此問題。我一直在試圖解決這一問題CUS首先,它說失敗等故障的CUS,我已經改變了的Android版本,以解析文件失敗highlight_text_material.xml

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> 

有沒有人有同樣的問題?

+0

我用xml文件編輯過... –

回答

2

如果您看到路徑C:..\AppData\Local\Android\sdk\platforms\android-23\data\res\color\highlighted_text_material.xml,它使用的是android-23,所以您可能需要將api更改爲23並嘗試編譯。

+0

對,明白了......感謝伴侶。我已經修復了一些其他人,但只是與這個愚蠢的錯誤感到困惑......感謝您的幫助 –

+0

當然會做;) –