android - 我在哪里可以将构建操作设置为 "AndroidResource"?

标签 android visual-studio xamarin xamarin.forms xamarin.android

当我想自定义程序的通知图标时,这一切都开始了。图标位于 drawable文件夹,我需要将它传递给 SetSmallIcon用作整数类型(资源 ID)。

在我的 Xamarin.Android 项目中,我有文件 AboutResources.txt带有以下提示:

In order to get the build system to recognize Android resources, set the build action to "AndroidResource". The native Android APIs do not operate directly with filenames, but instead operate on resource IDs. When you compile an Android application that uses resources, the build system will package the resources for distribution and generate a class called "Resource" that contains the tokens for each one of the resources included.



但是看不懂,哪里可以设置构建操作 .我在 Project 的选项中没有找到类似的东西。

可能是我错过了一些按钮或复选标记?

PS :

Visual Studio 2017

最佳答案

只需右键单击放入drawables文件夹的图标文件->您将能够看到“构建操作”选项

关于android - 我在哪里可以将构建操作设置为 "AndroidResource"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61168122/

相关文章:

java - 在没有互联网连接到 Wifi 时使用蜂窝数据

Android Webview HTML5 地理编码

Android:从通知中恢复上次 Activity

c++ - Visual C++ 中的 __PRETTY_FUNCTION__

ios - 在哪里可以找到 xamarin ios 设备日志?

c# - 如果我在 Xamarin 应用程序中使用数据库连接字符串值有多安全?

c# - Xamarin 未找到 'ToolbarItems' 的属性、可绑定(bind)属性或事件

java - Android将PGP集成到项目中

windows - 对我的编程工作进行屏幕录制

c++ - 在 Visual Studio 中的 dll 内的函数处设置断点?