运行 一个应用程序在 Android Studio 更新后出现图像错误

Error with the image when running a app, after Android Studio update

我刚刚更新到 Android Studio 的新版本,我的应用停止在预览屏幕中显示。

我得到的错误是这样的:

Error:Execution failed for task ':app:mergeDebugResources'.

C:\Users\So BE\AndroidStudioProjects\SustainableBusinessCard\app\src\main\res\drawable\SDlogo_black.jpg: Error: 'S' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore

我试着把图片的名字"SDlogo_black"改成"sdlogoblack",还是不行,按照这个question

的建议

如有任何帮助,我们将不胜感激。

根据文档,在 Android SDK 中命名资源时,您必须仅在 lowercase a-z, 0-9 or underscore 中命名。根据文档命名资源后,只需 cleanrebuild 您的项目。