Error:Execution failed for task ':app:processDebugResources'.个人已解决
2018-03-17 13:59
363 查看
个人问题出现场景:在编写ListView列表时,主类中初始化数据时,R报错,找不到该资源文件
个人问题出现原因:是res资源下drawable文件夹中放置的图片有问题。(Goole了一下,发现每个人问题可能不一样)
drawable官方文档说明:
A drawable resource is a general concept for a graphic that can be drawn to the screen and which you can retrieve with APIs such as
4000
EG image.
Nine Patch: an extension to the PNG format allows it to specify information about how to stretch it and place things inside of it.
Shape: contains simple drawing commands instead of a raw bitmap, allowing it to resize better in some cases.
Layers: a compound drawable, which draws multiple underlying drawables on top of each other.
States: a compound drawable that selects one of a set of drawables based on its state.
Levels: a compound drawable that selects one of a set of drawables based on its level.
Scale: a compound drawable with a single child drawable, whose overall size is modified based on the current level.
①个人当时编写代码时比较匆忙,没有提前准备好相应的图片,就找了电脑里几张喜欢的图片,复制粘贴在drawable下,在代码中R资源文件爆红,显示找不到,在引入资源时R文件发生报错,报错查看locat之后发现原因:drawable图片尺寸过大;
②紧接着,删除了过大的图片,又试着找了几张图标图,结果依然R文件报错,locat中显示Error:Execution failed for task ':app:processDebugResources'。带着问题查找了官方文档,最终发现是drawable文件夹下面的图片资源文件错误。删除之后,程序正常运行,列表也显示成功。
Error:Execution failed for task ':app:processDebugResources'——每个人出现问题的原因可能不同,针对locat给出的提示,在结合官方API文档,去查找对应的解决办法。
个人问题出现原因:是res资源下drawable文件夹中放置的图片有问题。(Goole了一下,发现每个人问题可能不一样)
drawable官方文档说明:
Drawable Resources
SEE ALSO
2D GraphicsA drawable resource is a general concept for a graphic that can be drawn to the screen and which you can retrieve with APIs such as
getDrawable(int)or apply to another XML resource with attributes such as
android:drawableand
android:icon. There are several different types of drawables:Bitmap: the simplest Drawable, a PNG or JP
4000
EG image.
Nine Patch: an extension to the PNG format allows it to specify information about how to stretch it and place things inside of it.
Shape: contains simple drawing commands instead of a raw bitmap, allowing it to resize better in some cases.
Layers: a compound drawable, which draws multiple underlying drawables on top of each other.
States: a compound drawable that selects one of a set of drawables based on its state.
Levels: a compound drawable that selects one of a set of drawables based on its level.
Scale: a compound drawable with a single child drawable, whose overall size is modified based on the current level.
①个人当时编写代码时比较匆忙,没有提前准备好相应的图片,就找了电脑里几张喜欢的图片,复制粘贴在drawable下,在代码中R资源文件爆红,显示找不到,在引入资源时R文件发生报错,报错查看locat之后发现原因:drawable图片尺寸过大;
②紧接着,删除了过大的图片,又试着找了几张图标图,结果依然R文件报错,locat中显示Error:Execution failed for task ':app:processDebugResources'。带着问题查找了官方文档,最终发现是drawable文件夹下面的图片资源文件错误。删除之后,程序正常运行,列表也显示成功。
Error:Execution failed for task ':app:processDebugResources'——每个人出现问题的原因可能不同,针对locat给出的提示,在结合官方API文档,去查找对应的解决办法。
相关文章推荐
- Aandroid:Error:Execution failed for task ':app:processDebugResources'. 的解决办法
- Error:Execution failed for task ':app:processDebugResources'.解决
- Error:Execution failed for task ':app:processDebugResources'. 的解决办法
- Error:Execution failed for task ':app:processDebugResources'. 的解决办法
- Error: Execution failed for task ':app:processDebugResources'.
- Error:Execution failed for task ':app:processDebugResources.'
- Error:Execution failed for task ':app:mergeDebugResources'解决办法
- Error:Execution failed for task ':app:processDebugResources'. > java.io
- Error:Execution failed for task ':app:processDebugResources'. > java.io.IOEx
- AndroidStudo编译时出现“Error:Execution failed for task ‘:app:mergeDebugResources‘. > Some file cru'”,解决办法
- Error:Execution failed for task ':app:processDebugResources'. > No slave process to process jobs, ab
- Error:Execution failed for task ':app:processDevDebugResources'. > com.android.ide.common.process.Pr
- Error:Execution failed for task ':app:processDebugResources'.
- 问题:找不到R文件 报错Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common
- Android: Execution failed for task ':app:processDebugResources' 异常解决
- 问题:找不到R文件 报错Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common
- Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'解决办法
- Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed with multipl 解决
- Error:Execution failed for task ':app:mergeDebugResources'解决办法
- [AS尝龟]导入RecyclerView后错误解决方法:Error:Execution failed for task ':app:processDebugManifest'. > Manifest