无法加载Android应用程序的徽标

无法加载Android应用程序的徽标,android,macos,apk,Android,Macos,Apk,我正在使用MacOS开发一个Android应用程序。我无法生成apk文件 错误: 错误:(14)错误:意外的资源引用类型;@string/[ReferenceType]类型的预期值 XML文档中的我的代码: <string name="icon_name">@mipmap/ic_lau_spt</string> @mipmap/ic\u lau\u spt 为什么会生成错误?之所以生成错误,是因为xml项是字符串 <string name="icon_name"

我正在使用MacOS开发一个Android应用程序。我无法生成apk文件

错误:

错误:(14)错误:意外的资源引用类型;@string/[ReferenceType]类型的预期值

XML文档中的我的代码:

<string name="icon_name">@mipmap/ic_lau_spt</string>
@mipmap/ic\u lau\u spt

为什么会生成错误?

之所以生成错误,是因为xml项是字符串

<string name="icon_name">@mipmap/ic_lau_spt</string>
   ^                                           ^

在android清单中,将ic_启动器替换为字符串标记中的图像。
@mipmap/ic_lau_spt
是图像资源id。

在AndroidManifest.xml中

您可以定义应用程序图标

<application
    android:icon="@mipmap/ic_launcher">
</application>

在应用程序标记内的manifest.xml文件中放置

<manifest

  <application
        android:icon="@mipmap/ic_launcher">
  </application>

</manifest>

可以放入什么?它是应用程序徽标。只需在AndroidManifest文件中放入
android:icon=“@mipmap/ic\u lau\u spt”
at即可。只需从strings.xml文件中删除“@mipmap/ic\u lau\u spt”。可以使用什么资源id?只需从strings.xml文件中删除“@mipmap/ic\u lau\u spt”即可编译并运行项目。
<manifest

  <application
        android:icon="@mipmap/ic_launcher">
  </application>

</manifest>