【问题标题】:Xamarin - android: no resource foundXamarin - android:找不到资源
【发布时间】:2019-04-10 16:39:19
【问题描述】:

执行项目,文件中出现找不到资源错误:

<?xml version="1.0" encoding="UTF-8" ?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
    android:oneshot="false">

    <item android:drawable="@drawable/spinner/load0.png" android:duration="100" />
    <item android:drawable="@drawable/spinner/load1.png" android:duration="100" />

</animation-list>

我的可绘制 png 图像位于文件夹 Resource->drawable->spinner->load0, load1。 你的错在哪里?

【问题讨论】:

    标签: android xamarin android-resources


    【解决方案1】:

    您不能在 Drawable 文件夹中添加文件夹,因为 ResourceDesigner 会处理所有这些,并且 Android 不允许在资源文件夹中使用用户特定的文件夹,请尝试将它们直接从资源中的 Spinner 文件夹中移出并使用它们。有关更多详细信息,请查看这些

    Can the Android drawable directory contain subdirectories?

    Possible to create subfolders in drawable folder in Android Studio?

    Android 允许的文件夹可以在这里找到 https://developer.android.com/guide/topics/resources/providing-resources

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-12
      • 1970-01-01
      • 2018-08-20
      • 2018-12-07
      • 2021-05-22
      相关资源
      最近更新 更多