【发布时间】:2016-12-07 07:33:53
【问题描述】:
尽管我没有选择 photothumb.db 作为可绘制对象,但我收到一条错误消息,提示 photothumb.db 应该以 .xml 或 .png 结尾
我的profilesmaller 图像属于png 类型
下面是我的代码
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/profilesmaller"
tools:context="charlenebuena.guest.HomeFragment">
</FrameLayout>
以下是我的 Gradle 控制台消息
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> C:\Users\Charlene Marie\AndroidStudioProjects\Guest\app\src\main\res\drawable\photothumb.db: Error: The file name must end with .xml or .png
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.72 secs
【问题讨论】:
-
把photothumb.db的位置从drawable改成asset文件夹就可以解决问题了
-
@Char 可绘制的图像是否在文件名中具有 jpg 或 png 扩展名
-
photothumb 是图片还是数据库文件?
-
您需要手动创建它检查我的答案,如果有帮助,请将其标记为正确,谢谢。
标签: android android-drawable android-image android-background