我在我的應用程序類中有編譯錯誤。這裏是我的代碼有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