简体   繁体   English

Android Studio 中 jpg 文件的“文件名必须以 .xml 结尾”错误

[英]“the file name must end with .xml” error for jpg file in Android Studio

I am getting this error while building my app.我在构建我的应用程序时收到此错误。 The drawable folder has the valid.jpg file and this is causing the error.可绘制文件夹具有 valid.jpg 文件,这导致了错误。 How to bypass this?如何绕过这个? Also, I noticed that the path shown in the error is "main\res\routine\Routine.jpg", but there is no such folder in the project.另外,我注意到错误中显示的路径是“main\res\routine\Routine.jpg”,但项目中没有这样的文件夹。

AGPBI: {"kind":"error","text":"The file name must end with .xml",
"sources":[{"file":"C:\\Users\\Lenovo\\AndroidStudioProjects\\project3\\app\\src\\main\\res\\routine\\Routine.JPG"}],
"tool":"Resource and asset merger"}```
UPDATE: solved the problem by reuploading the pic and saving it in drawable_V21. still dont know about that error message though. might be a bug

I guess that error you're experiencing is because of the file extension being in.JPG instead of.jpg try changing it.我猜您遇到的错误是因为文件扩展名是 .JPG 而不是 .jpg 尝试更改它。 It may help somehow它可能会有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM