Android (Xamarin) 使用清单文件

Android (Xamarin) Using Manifest File

Android 文档(例如https://developer.android.com/guide/components/fundamentals.html)建议所有 Activity 都需要在清单 XML 文件中声明。

虽然我已使用此文件获得权限,但我到目前为止还没有输入任何 Activity 详细信息。但是,我确实在 class 源文件中为每个 Activity 设置了一个预处理指令,例如

[Activity(Theme = "@style/AppFullScreenTheme", MainLauncher = true, ScreenOrientation = ScreenOrientation.Portrait, NoHistory = true, Icon = "@mipmap/ic_launcher")]

是否必须向清单添加 Activity 详细信息?

谢谢

here 所述,当您使用预处理指令时,Xamarin 会自动将这些活动添加到您的清单中。因此,您的活动实际上是在 Xamarin 构建应用程序时在清单中定义的。