作者:一坛苦水_179 | 来源:互联网 | 2023-05-18 18:45
AftercompilingmyAndroidapplicationusingtheAndroidStudio(Beta),Ihavethefollowingerror:
After compiling my Android application using the Android Studio (Beta), I have the following error:
在使用Android Studio (Beta)编译我的Android应用程序后,我有以下错误:
Error:error: Resource entry background is already defined.
res\drawable-xhdpi-v4\background.9.png:0: Originally defined here.
This occurred when I had a image file called "background" in my res folder.
这发生在我的res文件夹中有一个名为“background”的图像文件。
I then made a 9 patch version of it and pasted it in the same folder. This meant that there was 2 files with the same name. So I unsurprisingly I had this error.
然后我做了一个9补丁版本,并粘贴在同一个文件夹。这意味着有两个同名的文件。所以我不奇怪我有这个错误。
However I now deleted all instances of the background image file (including the 9 patch version and original image) in my code and layout file and I still have this error.
但是我现在已经删除了我的代码和布局文件中的背景图像文件(包括9个补丁版本和原始图像)的所有实例,我仍然有这个错误。
7 个解决方案