我在我的应用程序类中有编译错误。这里是我的代码有AssemblyInfo.cs
:编译错误 - 具有[应用程序]属性和[程序集:应用程序]属性的类型
[assembly: AssemblyTitle("myApp")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("CCS")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion ("0.1.0")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]
#if DEBUG
[assembly: Application(Debuggable = true)]
#else
[assembly: Application(Debuggable=false)]
#endif
这是MainActivity.cs
我的应用程序类:
[Application]
public class MyApplication : Android.App.Application
{
//public static string globaly = "CSS!";
public static int AppNr;
public MyApplication(IntPtr handle, JniHandleOwnership ownerShip) : base(handle, ownerShip)
{
}
public override void OnCreate()
{
// If OnCreate is overridden, the overridden c'tor will also be called.
base.OnCreate();
}
我收到此错误信息:
应用程序不能同时拥有键入[应用程序]属性 和[程序集:应用程序]属性
谢谢你有关如何解决这个问题的任何建议。
(因此)是一个仅限英语的网站。请用英文发表。 [见这里](https://meta.stackexchange.com/q/13676/204869),[这里](https://meta.stackoverflow.com/a/262054/1402846)和[here](https: //blog.stackoverflow.com/2009/07/non-english-question-policy)了解详情。谢谢。 – Pang