错误:文件名必须以 .xml 或 .png 结尾 [英] Error: The file name must end with .xml or .png
本文介绍了错误:文件名必须以 .xml 或 .png 结尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
即使我没有选择 photothumb.db 作为可绘制对象,我也收到一条错误消息,提示 photothumb.db 应该以 .xml 或 .png 结尾
Even though I didn't choose photothumb.db as a drawable, I get an error saying photothumb.db should end with .xml or .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 控制台消息
Below is my Gradle Console Message
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
推荐答案
Android 仅接受 .png、.jpg、.gif 和 .xml 文件作为可绘制资源.如果您有文件 .db 文件,则将该文件放在资产文件夹中.
Android accepts only .png, .jpg, .gif and .xml files as drawable resources. If you have file .db file then put that file in assets folder.
这篇关于错误:文件名必须以 .xml 或 .png 结尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文