2014-11-03 63 views
3

谷歌現在有Android棒棒糖,我打開了我的SDK管理器,並決定更新幾個軟件包...這是從2天裏偷偷摸摸的。 Can't find theme檢索項目的父項時出錯:找不到與給定名稱'Theme.AppCompat.Light'匹配的資源。我的R.java失蹤

我也試過這樣:Failed to rename directory

不成功。我試圖從谷歌下載一個新的sdk並從頭開始安裝,但沒有再次運行。 這是錯誤。

D:\~\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. 

D:\~\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. 

D:\~\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. 


    [1]: https://stackoverflow.com/questions/8839255/failed-to-rename-directory-tools-to-temp-toolpackage-old01-in-c-android-sdk-win 

如果有人幫我嘗試運行我的日食Juno,我將非常感謝。我也可以說,我的一些舊的應用程序與較低版本的工作,但是當我創建一個新的...錯誤:

import android.support.v7.app.ActionBarActivity; It is not reading the android.suppor.v7

那麼,如果我把它引用到我的Android應用我有!標誌和很多錯誤,如:

D:\Android Studio\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\appcompat\res\values-v21\themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'. 
D:\Android Studio\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\appcompat\res\values-v21\themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'. 
D:\Android Studio\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\appcompat\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'. 
+0

從答案做各種事情http://stackoverflow.com/questions/26431676/appcompat-v721-0-0-no-resource-found-that-matches-the-given-name-attr-andro幫助我。沒有錯誤了。 – 2016-07-04 00:08:41

回答

1

對我來說,與最新的(21.0.2)的Android版本。 Support Library解決方案是將appcompat_v7項目的構建目標更改爲API 21(Android 5.0),並進行清理和重建。

0

您是否嘗試將目標SDK更新到21並構建項目?

+0

是的,我試過了。還是一樣。 SDK Manager的所有內容都已安裝。我認爲它試圖將舊更新放在舊包上時失敗了。我已經嘗試清理該項目,然後再構建它。在一年之前,我遇到了同樣的問題,但是這次我無法修復它。 – JumboJey 2014-11-03 16:59:52

0

得到了同樣的問題......也許一個解決方案是下載一箇舊的SDK,而不是更新它。

+1

嘿,我找到了一個解決方案。從「bin」文件夾下載並安裝Android Studio。然後我下載了SDK Manager的安裝程序,然後我必須更新SDK Manager,然後下載所有軟件包。 Android Studio,現在不給我任何問題。 我放棄了Eclipse。我只是想知道如果我應該再次嘗試Eclipse,因爲Android Studio開始工作... – JumboJey 2014-11-05 14:41:14

3

我解決了gradle這個變化問題

compile 'com.android.support:appcompat-v7:21.0.0' 
compile 'com.android.support:support-v4:21.0.0' 

compile 'com.android.support:appcompat-v7:19.0.0' 
compile 'com.android.support:support-v4:19.0.0' 

和編譯/目標SDK至19

相關問題