最近,我通过一本书开始学习使用Xamarin.Forms开发移动应用程序。我创建了一个应用程序“ Hello”,其中包含六个项目,一个可移植共享库项目,一个Android,一个iOS和三个Windows(两个用于Windows 8和Windows 8 Phone,一个用于Windows 10 UWP)。我正在获取NuGet软件包更新,而我的问题从那里开始。
第一个问题:
更新主要是Android支持库的更新,但其中一个是Xamarin.Forms的更新。除此以外,所有其他人均已更新。我所有的Android支持库程序包都更新到了v23.2.1。尝试更新Xamarin.Forms时出现以下错误:
因此,我决定不进行更新,然后继续构建项目(我所做的唯一修改是在App.cs中,更改XAlign
为HorizontalTextAlign
因为我在错误列表中得到了警告,以确保这样做,其余所有代码均已存在,因为是的),这是我的second problem
:
我从Hello.Droid得到119个错误,从Hello.iOS得到2个警告,从Hello.WinPhone得到1个警告,从Hello.Windows得到1个警告,从Hello得到1个警告(Hello是我的应用程序名称)。以下是屏幕截图:
Errors not visible in the screenshots have the code CS0117 and have description starting with: "'Resource.Stylable' does not contain... etc."
I don't understand what is causing these errors and what is the solution for them. The only reason to post my question here is that I was not able to find a solution to my problem on the internet. I've searched a lot.
Help would be appreciated.
P.S. I've got to know that Xamarin experts are trying to help developers at this site, so I request them to try to help me too.
If any more information is needed, just tell me, I'll provide it.
Thanks in advance.
EDIT: These are the Android support packages:
EDIT 2: Screenshot of the new errors:
This question continues here: Part 2
The initial errors you were getting are because Xamarin Forms only supports 23.0.1.3. With XF 2.2.0-pre1 they have updated to 23.1.1.1 but its still not the latest.
To remove these errors, I would uninstall all Google support packages and Xamarin Forms. Then just download Xamarin Forms and it will install the correct version.
The best option is to never to an Update All in Xamarin in the future.
Then after this is done the Resource.Designer.cs file might still cause some issues. As such, go to that file, delete everything inside of it and then rebuild the project again.
As for your licensing errors, make sure you update to the latest version of Xamarin.
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句