Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.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
Android 使用drawable中的.9.png后未找到任何资源_Android_Drawable - Fatal编程技术网

Android 使用drawable中的.9.png后未找到任何资源

Android 使用drawable中的.9.png后未找到任何资源,android,drawable,Android,Drawable,我是Android Studio的新手。 我将.9.png复制到可绘制hdpi中,并将该图像用作背景 但它给出了一个错误: Error:(6, 25) No resource found that matches the given name (at 'background' with value '@drawable/spc'). Error:Execution failed for task ':app:processDebugResources'. > com.android.

我是Android Studio的新手。
我将
.9.png
复制到
可绘制hdpi
中,并将该图像用作背景

但它给出了一个错误:

Error:(6, 25) No resource found that matches the given name (at 'background' with value '@drawable/spc').

  Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\software\new sdk\sdk\build-tools\23.0.0\aapt.exe'' finished with non-zero exit value 1

如何解决此错误?

首先清理并重新启动IDE

我认为这是你的9-patch图像问题


@drawable/spc
可能不是9面片(帧上没有黑色像素),因此一个可能的修复方法是将spc.9.png更改为spc.png

请显示您的实现。有任何打字错误吗?@Christopher这是屏幕截图@IntelliJAmiya是的,先生,使用9patcch@user3596211清理并重建您的ide@user3596211如果您设置另一个映像而不是此9修补程序,是否有任何问题???@user3596211如果“否”然后我假设你的补丁图像有问题,这就是为什么ide无法识别如果我使用logo.9.png没有错误,那么splc.9的问题是什么。png@user3596211从文件夹中删除所有9个修补程序映像(提供备份..哈哈哈),并从中创建9个修补程序