今天,我为我们的Android版本更新了NuGet软件包(我们目前正在为Android和iOS开发). 更新之后,我无法再构建Android版本.到目前为止,这是我在更新包之后每次都遇到的问题,但是这次我无法解决此问题. 通常,重新启动Xamarin或重新安装NuGet软件包会有所帮助.
today I updated the NuGet packages for our Android version (we are currently developing for Android and iOS). After the updates I cannot build the Android version anymore. This is an issue I faced everytime after updating packes so far, but this time I can't solve this problem. Usually restarting Xamarin or Reinstalling the NuGet packages helped.
我有151条这样的错误消息:
I have 151 error messages like this one:
/用户/用户名/项目/MyAppName/Droid/Resources/Resource.designer.cs(118,118): 错误CS0117:> MyAppName.Droid.Resource.Attribute'不包含 mediaRouteSettingsDrawable的定义"(CS0117)(MyAppName.Droid)
/Users/Username/Projects/MyAppName/Droid/Resources/Resource.designer.cs(118,118): Error CS0117: >MyAppName.Droid.Resource.Attribute' does not contain a definition for mediaRouteSettingsDrawable' (CS0117) (MyAppName.Droid)
以下是我已经尝试解决此问题的所有步骤(按此顺序):
Here are all the steps I already did trying to fix this problem (in this order):
添加Android软件包:仅添加所需的软件包,让NuGet自行解决依赖关系(例如Xamarin.Android.Support,Xamarin.GooglePlayServices等). 已安装的软件包(按此顺序):
Add Android packages: only add the needed packages, let NuGet resolve dependencies (like Xamarin.Android.Support, Xamarin.GooglePlayServices etc.) on its own. Installed packages (in this order):
Xamarin.Forms ...................................................(2.2.0.45) Xamarin.Forms.Maps ....................................(2.2.0.45) XLabs.Forms ............................................(2.0. 5782) ZXing.Net.Mobile ...(2.0.4.46) Newtonsoft.Json ....................................(8.0.3) Xam.Plugin.Geolocator ....................................(3.0.4)
Xamarin.Forms.......................................(2.2.0.45) Xamarin.Forms.Maps...........................(2.2.0.45) XLabs.Forms............................................(2.0.5782) ZXing.Net.Mobile..................................(2.0.4.46) Newtonsoft.Json....................................(8.0.3) Xam.Plugin.Geolocator........................(3.0.4)
构建->清理所有
我真的不知道该怎么办了. 感谢您的任何帮助/想法,谢谢.
I really don't know what to do anymore. Any help / ideas are appreciated, thanks in advance.
推荐答案
Xamarin.Forms ...(2.2.0.45)
Xamarin.Forms...(2.2.0.45)
XLabs.Forms .....(2.0.5782)
XLabs.Forms.....(2.0.5782)
这就是重点.最后一个稳定的Xamarin.Forms存在一些问题,当您使用XLabs或其他库时,这些问题可能会导致生成错误.
That's the point. The last stable Xamarin.Forms has some problems that may cause build errors when you're using XLabs or another library.
我知道的唯一解决方案是使用XLabs.Forms的预发行版本-2.2.0-pre02.
The only solution which I know is to use pre-release version of XLabs.Forms - 2.2.0-pre02.
就我而言,我更新了XLabs软件包并清除/重建了我的解决方案.
In my case I updated XLabs packages and cleared/rebuild my solutions.
XLabs问题跟踪器和 Xamarin Bugzilla .
更多推荐
Resource.Designer.cs:“资源...不包含...的定义".
发布评论