相关疑难解决方法(0)

当前命名空间中不存在类型或命名空间"App"

我在Visual Studio 2015中遇到了一个新制作的Xamarin.Forms应用程序的问题.我将Droid/iOS项目添加到解决方案中,它给了我一个构建错误,说...

The type or namespace 'App' does not exist in the current namespace

以下是两个错误的位置示例.

Droid项目:

namespace MyApp.Droid
{
    [Activity (Label = "MyApp", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
    {
        protected override void OnCreate (Bundle bundle)
        {
            base.OnCreate (bundle);

            global::Xamarin.Forms.Forms.Init (this, bundle);
                LoadApplication (new MyApp.App ());
                //Error on the above line at MyApp.App ()
            }
        }
}
Run Code Online (Sandbox Code Playgroud)

iOS项目:

namespace MyApp.iOS
{
    [Register("AppDelegate")]
    public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
    { …
Run Code Online (Sandbox Code Playgroud)

xamarin.ios xamarin.android xamarin xamarin.forms

10
推荐指数
1
解决办法
9399
查看次数