Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
&引用;文件名必须以.xml“结尾;Android Studio中jpg文件出错_Android_Android Studio_Gradle_File Extension - Fatal编程技术网

&引用;文件名必须以.xml“结尾;Android Studio中jpg文件出错

&引用;文件名必须以.xml“结尾;Android Studio中jpg文件出错,android,android-studio,gradle,file-extension,Android,Android Studio,Gradle,File Extension,我在构建应用程序时遇到此错误。drawable文件夹具有有效的.jpg文件,这导致了错误。如何绕过这个?另外,我注意到错误中显示的路径是“main\res\routine\routine.jpg”,但项目中没有这样的文件夹 AGPBI: {"kind":"error","text":"The file name must end with .xml", "sources":[{"file

我在构建应用程序时遇到此错误。drawable文件夹具有有效的.jpg文件,这导致了错误。如何绕过这个?另外,我注意到错误中显示的路径是“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

我猜您遇到的错误是因为文件扩展名是.JPG而不是.JPG。请尝试更改它。它可能会有所帮助

“但项目中没有这样的文件夹”--构建工具与您不一致。@Commonware确实没有。不能在这里添加图片。在这里发布之前,我会知道我的项目中是否有类似的文件夹,不是吗?“不能在这里添加图片”--你可以在别处上传图片并链接到它们。“在发布到这里之前,我会知道我的项目中是否有类似的文件夹,不是吗?”--同样,构建工具认为在这个模块的
res/
目录中有一个
routines/
目录。因此,我们需要确定为什么构建工具认为
例程/
存在而您不存在。您如何查找
例程/
?你在用安卓工作室吗?如果是这样的话,项目树上的下拉列表是说“Android”还是“project”?如果显示“Android”,请将其更改为“Project”,然后再次查找
例程/
。我猜您遇到的错误是因为文件扩展名位于.JPG而不是.JPG中。请尝试更改它。这可能会有所帮助。谢谢,通过重新加载图片并将其保存在drawable_v21文件夹中解决了问题。但我不知道那个例行文件夹错误消息