我正在研究 Xamarin Studio 和它的初学者。我正在使用 Forms 制作跨平台应用程序。ut 基本项目在我构建它时出现此错误“错误 CS0246:找不到类型或命名空间名称‘页面’(您是否缺少 using 指令或程序集引用?)”如果有人知道答案,请帮助我。这是app.cs的代码:
using System;
using Xamarin.Forms;
namespace CrossPlatformAppForms
{
public class App
{
public static Page GetMainPage () //This is the line where i'm getting the error
{
return new ContentPage {
Content = new Label {
Text = "Hello, Forms !",
VerticalOptions = LayoutOptions.CenterAndExpand,
HorizontalOptions = LayoutOptions.CenterAndExpand,
},
};
}
}
}
MyApp.Android 中的另一件事是我收到目标框架不兼容的警告(.Net framework 4.5 ...)