1.react-native run-android 失败

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:

原因解析:

(1)不同模块之间或者同一个模块的不同目录下存在不同类型的相同名字的资源,比如图片。

因为这是两个不同类型的资源 但名字却相同,所有造成资源合并异常。比如同时存在logo.png和logo.jpg。

(2) react-native 仅支持 png 格式

解决步骤:

方案一:转换图片类型

方案二:在 build.gradle 中配置权限

android {
  aaptOptions.cruncherEnabled = false
  aaptOptions.useNewCruncher = false
}

react-native 异常处理 Execution failed for task ':app:mergeDebugResources'.的更多相关文章

  1. Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs f

    今天调试安卓程序遇到的问题Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching fa ...

  2. Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs for details

    Android Studio 编译中断.... Error:Execution failed for task ':app:mergeDebugResources'. > Some file c ...

  3. Error:Execution failed for task ':app:mergeDebugResources'. > Crunching Cruncher ******.9.png

    有时候在Android Studio导入Eclipse项目时,会出现Error:Execution failed for task ':app:mergeDebugResources'. > C ...

  4. Android Studio:Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs for details

    Gradle 编译错误: 14:39:58 Executing tasks: [clean, :app:generateDebugSources, :app:mockableAndroidJar, : ...

  5. Android Error:Execution failed for task ':app:mergeDebugResources'. > Crunching Cruncher bg_btn.9.png

    使用Android Studio来进行图片背景设置,编译时发生了一个mergeDebugResources异常. 异常原因 这个异常的意思是对资源合并发生错误,那就是我使用的图片资源有问题,我使用的图 ...

  6. Error:Execution failed for task ':app:mergeDebugResources'. > Error: Some file crunching failed, see logs for details

    android studio中的资源文件命名是不能带有数字的,因为会与R类的资源ID起冲突,所以编译就发生了错误.

  7. 【React Native错误集】* What went wrong: Execution failed for task ':app:installDebug'.

    错误1:* What went wrong: Execution failed for task ':app:installDebug'. > com.android.builder.testi ...

  8. 解决React Native安装应用到真机(红米3S)报Execution failed for task ':app:installDebug'的错误

    报错信息如下: :app:installDebug Installing APK 'app-debug.apk' on 'Redmi 3S - 6.0.1'Unable to install D:\R ...

  9. Error:Execution failed for task ':app:clean'.

    运行时出现 Error:Execution failed for task ':app:clean'. 错误,Builld->Clean Project即可.

随机推荐

  1. xshell输入字母空格间距变大

    按一下shift+空格(全角/半角转换的快捷键,引起的问题)

  2. linux中常用的60个命令及作用详解

    Linux 必学的 60 个命令 Linux 提供了大量的命令,利用它可以有效地完成大量的工作,如磁盘操作.文件存取.目录操作.进程管理.文件权限设定等.所以,在 Linux 系统上工作离不开使用系统 ...

  3. mysql : 使用不等于过滤null的问题

    在写sql时遇到查询结果不对的情况,经查阅,发现是因为查询条件过滤null的问题:从网上找到如下资料: 在写SQL 条件语句是经常用到 不等于‘!=’的筛选条件,此时要注意此条件会将字段为null的数 ...

  4. 华为交换机SOCK CPU占用率高处理方法

    问题截图: 解决方法: cpu-defend policy cpu auto-defend enable auto-defend attack-packet sample 5 auto-defend ...

  5. webpack基本介绍及使用

    1.什么是webpack webpack是一个前端资源加载/打包工具.它根据模块的依赖关系进行静态分析,然后将这些模块按照指定的规则生成对应的静态资源. 官网地址:https://www.webpac ...

  6. 1.go语言目录结构

    [root@localhost ~]# ll /go/ total drwxr-xr-x. root root May : api -rw-r--r--. root root May : AUTHOR ...

  7. python 重点理论知识点

    Python多线程 GIL blablabla concurrent blablabla 简单地说就是作为可能是仅有的支持多线程的解释型语言(perl的多线程是残疾,PHP没有多线程),Python的 ...

  8. VS2015配置OpenCV

    第一步:下载对应版本的VS2015和OpenCV3.4.1---->链接: https://pan.baidu.com/s/1YL_TlLi3k0SehsDY2DJ8nw 提 取码: 6g27 ...

  9. 攻防世界--simple-check-100

    测试文件:https://adworld.xctf.org.cn/media/task/attachments/2543a3658d254c30a89e4ea7b8950c27.zip 这道题很坑了, ...

  10. windows下使用命令行获取管理员权限

    在win下运行npm install安装依赖出现错误: Error: EBUSY, resource busy or locked 搜索错误信息后发现是由于没有管理员权限,在bash中输入以下命令后运 ...