简体   繁体   English

java android:res \\ drawable-hdpi \\ Restaurant-Blue-2-icon.png:无效的文件名:必须仅包含[a-z0-9_。],无法修复

[英]java android: res\drawable-hdpi\Restaurant-Blue-2-icon.png: Invalid file name: must contain only [a-z0-9_.], cant fix

i am getting: 我正进入(状态:

[2012-06-10 12:47:39 - pet_game] Launch canceled!
[2012-06-10 12:49:13 - pet_game] res\drawable-hdpi\Restaurant-Blue-2-icon.png: Invalid file name: must contain only [a-z0-9_.]
[2012-06-10 12:49:13 - pet_game] res\drawable-hdpi\Restaurant-Blue-2-icon.png: Invalid file name: must contain only [a-z0-9_.]
[2012-06-10 12:49:13 - pet_game] res\drawable-hdpi\Restaurant-Blue-2-icon.png: Invalid file name: must contain only [a-z0-9_.]
[2012-06-10 12:49:13 - pet_game] res\drawable-hdpi\Restaurant-Blue-2-icon.png: Invalid file name: must contain only [a-z0-9_.]
[2012-06-10 12:49:13 - pet_game] res\drawable-hdpi\Restaurant-Blue-2-icon.png: Invalid file name: must contain only [a-z0-9_.]
[2012-06-10 12:49:13 - pet_game] res\drawable-hdpi\baseball-icon.png: Invalid file name: must contain only [a-z0-9_.]

I know this is due to the fact that i have upper case letter in the image file name so I deleted those two files. 我知道这是由于我在图像文件名中使用大写字母,所以我删除了这两个文件。 However, I still get same error. 但是,我仍然遇到相同的错误。 I tried to refresh the entire project and restarting eclipse, but it didnt help. 我试图刷新整个项目并重新启动eclipse,但没有帮助。 what should i do? 我该怎么办?

Don't use: - . 请勿使用: - Instead use: _ . 而是使用: _

Uppercases are not allowed for resource names. 资源名称不允许使用大写字母。 Only lowercases(az), numbers0-9, .(dot) and _(underscore)are valid. 仅小写字母(az),数字0-9,。(点)和_(下划线)有效。
Use Restaurant_Blue_2_icon.png and baseball_icon.png for the image names. 使用Restaurant_Blue_2_icon.pngbaseball_icon.png作为图像名称。

baseball-icon.png名称太无效,请将其更改为baseball_icon.png ,这样就可以了。

暂无
暂无

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

相关问题 Android:无法将图像粘贴到Eclipse中的drawable-hdpi文件夹中 - Android: Cannot paste images to drawable-hdpi folder in eclipse 错误:在eclispe中找不到与给定名称(在'srcCompat',值为'@ drawable-hdpi / ic_launcher')匹配的资源 - Error: No resource found that matches the given name (at 'srcCompat' with value '@drawable-hdpi/ic_launcher') in eclispe aapt: res/layout/MainActivity.java 无效的文件名 - aapt: res/layout/MainActivity.java Invalid file name Android @ drawable / logos.png错误logos.png与属性android:res不兼容 - Android @drawable/logos.png error logos.png is incompatible with attribute android:res res / drawable不刷新文件名更改&& R无法解析为变量 - res/drawable not refreshing file name change && R cannot be resolved to a variable Android 7" hdpi 平板电脑的文件夹名称 - Folder name for 7" hdpi tablet Android Resources$NotFoundException:文件 res/drawable-xxhdpi-v4/toast_frame.9.png 来自 drawable 资源 .xml 扩展需要 - Resources$NotFoundException: File res/drawable-xxhdpi-v4/toast_frame.9.png from drawable resource .xml extension required 在Android中返回可绘制的res ID? - Return a drawable res id in Android? Java-如何从资源(可绘制)向布局添加JPG / PNG文件? - Java - How to add a JPG/PNG file from resources(drawable) to a layout? 错误:使用.png时文件名必须以.xml或.png结尾 - Error: The file name must end with .xml or .png when using .png
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM