簡體   English   中英

如何修復“找不到與給定名稱匹配的資源('value'與值'@ integer / google_play_services_version')”

[英]How to fix “No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version')”

我在Visual Studio 2015中構建我的Android App項目時收到以下錯誤。

找不到與給定名稱匹配的資源('value'的值為'@ integer / google_play_services_version')

這些行位於:

obj\Debug\android\manifest\AndroidManifest.xml

AndroidManifest file有3個內容。

我已從SDK Manager下載了Google Play服務。

我應該參考我的解決方案嗎?

我已經有Xamarin.GooglePlayServices.Base, Xamarin.GooglePlayServices.Basement, Xamarin.GooglePlayServices.Maps參考。

謝謝。

你已經在value文件夾中創建了integer.xml文件,並將你的Integer定義到那個地方它將解決你的問題。

嘗試執行並清除所有內容並檢查obj下的所有內容是否已刪除,然后執行全部構建。

如果這不起作用:

我會嘗試刪除~GooglePlayServices~ nugets /引用,並重新添加只是 Xamarin.GooglePlayServices.Maps的NuGet將在帶給~Basement~Base庫。

您應該得到一個生成的清單,該清單只有一個對google_play_services_version引用,並且該資源應該從Debug / android / XXX / YYYYYY / ZZZZZ / R.java中獲取:

public static final int google_play_services_version=0x7f070000;

我添加了幾個新包。 其中一個包是錯誤的原因。 我必須逐個檢查並發現導致錯誤的一個。 刪除該包是我解決錯誤所需要做的全部工作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM