即使我沒有選擇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