即使我没有选择photothumb.db的绘制,我得到一个错误说photothumb.db应.XML结束或.png错误:文件名必须以.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>
下面是我的摇篮控制台消息
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改为资产文件夹,它将解决问题 – Nitesh
@Char无论图片还是数据库文件,drawable中的图片文件名中是否带有jpg或png扩展名 – Vishwa
? – Nitesh