Why does Android crash when SVG files in 'res' folder don't end with .xml or .?

2026-06-10 06:441阅读0评论SEO问题
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计173个文字,预计阅读时间需要1分钟。

Why does Android crash when SVG files in 'res' folder don't end with .xml or .?

错误类别:资源合并失败

错误信息:在合并资源时遇到错误,文件名必须以.xml或.png结尾。错误发生在/home/petergriffin/folder1/another-app/MyAwesome-App/app/src/main/res/drawable-hdpi/logo.svg。执行失败。


Why does Android crash when SVG files in 'res' folder don't end with .xml or .?

错误类似:

:app:mergeDebugResources
:app:mergeDebugResources FAILED
/home/petergriffin/folder1/another-app/MyAwesome-App/app/src/main/res/drawable-hdpi/logo.svg
Error:Error: The file name must end with .xml or .png
Error:Execution failed for task ':app:mergeDebugResources'.
> /home/petergriffin/folder1/another-app/MyAwesome-App/app/src/main/res/drawable-hdpi/logo.svg: Error: The file name must end with .xml or .png
Information:BUILD FAILED

添加:
android.disableResourceValidation=true

gradle.properties
该文件在settings.gradle附近


本文共计173个文字,预计阅读时间需要1分钟。

Why does Android crash when SVG files in 'res' folder don't end with .xml or .?

错误类别:资源合并失败

错误信息:在合并资源时遇到错误,文件名必须以.xml或.png结尾。错误发生在/home/petergriffin/folder1/another-app/MyAwesome-App/app/src/main/res/drawable-hdpi/logo.svg。执行失败。


Why does Android crash when SVG files in 'res' folder don't end with .xml or .?

错误类似:

:app:mergeDebugResources
:app:mergeDebugResources FAILED
/home/petergriffin/folder1/another-app/MyAwesome-App/app/src/main/res/drawable-hdpi/logo.svg
Error:Error: The file name must end with .xml or .png
Error:Execution failed for task ':app:mergeDebugResources'.
> /home/petergriffin/folder1/another-app/MyAwesome-App/app/src/main/res/drawable-hdpi/logo.svg: Error: The file name must end with .xml or .png
Information:BUILD FAILED

添加:
android.disableResourceValidation=true

gradle.properties
该文件在settings.gradle附近