2016-07-19 41 views
0

我已將CardView組件添加到我的解決方案併產生了這些錯誤。在錯誤的下半部分,它指的是\Resources\values\style.xml這個文件在裏面存在缺失值。添加CardView組件後無法生成

我曾嘗試:

  • \AppData\Local\Xamarin\zips
  • 刪除所有的各種支持文件刪除下載的拉鍊在\AppData\Local\Xamarin
  • 清潔
  • 重啓VS
  • 更改編譯版本,從6.0到5.1
  • 刪除組件並重新添加
  • 從NuGet中刪除組件並添加Xamarin.Android.Support.v7.CardView

我需要做什麼?

\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(66): error APT0000: 
Error retrieving parent for item: No resource found that matches the given name 'Animation.AppCompat.Dialog'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(80): error APT0000: 
Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Display1'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(83): error APT0000: 
Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(84): error APT0000: 
Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(87): error APT0000: 
Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(90): error APT0000: 
Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(97): error APT0000: 
Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Button'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(100): error APT0000: 
No resource found that matches the given name: attr 'textAllCaps'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(102): error APT0000: 
Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(105): error APT0000: 
Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Dialog'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(110): error APT0000: 
Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(113): error APT0000: 
Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(119): error APT0000: 
No resource found that matches the given name: attr 'windowActionBar'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(120): error APT0000: 
No resource found that matches the given name: attr 'windowNoTitle'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(123): error APT0000: 
No resource found that matches the given name: attr 'windowActionBar'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(124): error APT0000: 
No resource found that matches the given name: attr 'windowNoTitle'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(127): error APT0000: 
No resource found that matches the given name: attr 'elevation'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(145): error APT0000: 
No resource found that matches the given name: attr 'backgroundTint'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(147): error APT0000: 
No resource found that matches the given name: attr 'elevation'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(153): error APT0000: 
No resource found that matches the given name: attr 'elevation'. 
\obj\Debug\resourcecache\5F2...97F5\res\values\values.xml(168): error APT0000: 
No resource found that matches the given name: attr 'elevation'. 
\Resources\values\style.xml(2): error APT0000: Error retrieving parent for item: 
No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar'. 
\Resources\values\style.xml(2): error APT0000: 
No resource found that matches the given name: attr 'actionBarPopupTheme'. 
\Resources\values\style.xml(2): error APT0000: 
No resource found that matches the given name: attr 'actionBarStyle'. 
\Resources\values\style.xml(2): error APT0000: 
No resource found that matches the given name: attr 'actionBarTheme'. 
\Resources\values\style.xml(2): error APT0000: 
No resource found that matches the given name: attr 'colorAccent'. 
\Resources\values\style.xml(2): error APT0000: 
No resource found that matches the given name: attr 'colorPrimary'. 
\Resources\values\style.xml(2): error APT0000: 
No resource found that matches the given name: attr 'colorPrimaryDark'. 
\Resources\values\style.xml(2): error APT0000: 
No resource found that matches the given name: attr 'windowActionModeOverlay'. 
\Resources\values\style.xml(2): error APT0000: 
Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.ActionBar.Solid'. 
\Resources\values\style.xml(2): error APT0000: 
Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog'. 
\Resources\values\style.xml(2): error APT0000: 
No resource found that matches the given name: attr 'colorAccent'. 
\Resources\values\style.xml(2): error APT0000: 
No resource found that matches the given name: attr 'colorPrimary'. 
\Resources\values\style.xml(2): error APT0000: 
No resource found that matches the given name: attr 'colorPrimaryDark'. 
\Resources\values\style.xml(2): error APT0000: 
No resource found that matches the given name: attr 'colorAccent'. 
\Resources\values\style.xml(2): error APT0000: 
Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.AppCompat.Button.Borderless'. 
+0

看起來你缺少支持庫。重新將這些添加到您的項目中,並確保這些資源在'Resource.designer.cs'文件中生成。 –

回答

0

檢查您的依賴版本。把所有相同的版本。 like:

compile 'com.android.support:appcompat-v7:23.3.0' 
compile 'com.android.support:recyclerview-v7:23.3.0' 
compile 'com.android.support:cardview-v7:23.3.0' 
compile 'com.android.support:design:23.3.0' 
compile 'com.android.support:percent:23.3.0' 

之後,清理並建立。

+0

謝謝,這使我走上了正確的道路,我通過將編譯版本從6.0更改爲5.1,然後將組件更新到v23來創建了錯誤 – tallpaul

相關問題