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. sql下的xml配置文件中特殊使用的sql语句编写

    1.使用服用的sql语句------------查询学生表所有字段 <sql id="selectAllStuAll"> select stu.id,stu.name, ...

  2. 使用docxtemplater来处理word模板

    工作中遇到需要根据不同数据来处理模板word的情况,网上搜索了一番之后,找到了一个叫做docxtemplater的库,使用起来非常便携,也十分满足此次的需求. 这次就来记录一下docxtemplate ...

  3. TensorFlow——MNIST手写数字识别

    MNIST手写数字识别 MNIST数据集介绍和下载:http://yann.lecun.com/exdb/mnist/   一.数据集介绍: MNIST是一个入门级的计算机视觉数据集 下载下来的数据集 ...

  4. Linux就该这么学04学习笔记

    今天开始学习,开始做笔记,希望自己能坚持下去 参考链接:https://www.linuxprobe.com/chapter-04.html vim编辑器 Linux系统中通用的文本编辑器 vi的升级 ...

  5. vue的请求数据方式

    一,vue-resource请求数据 介绍:vue-resource请求数据方式是官方提供的一个插件 步骤: 1,npm安装     npm  install vue-resource  --save ...

  6. numpy中tile的用法

    a=arange(1,3) #a的结果是: array([1,2]) 1,当 tile(a,1) 时: tile(a,1) #结果是 array([1,2]) tile(a,2) #结果是 array ...

  7. Could not resolve all files for configuration ':app:debugCompileClasspath'.解决方案

    异常如下: Error:FAILURE: Build failed with an exception. * What went wrong:Could not resolve all files f ...

  8. java并发学习--第六章 线程之间的通信

    一.等待通知机制wait()与notify() 在线程中除了线程同步机制外,还有一个最重要的机制就是线程之间的协调任务.比如说最常见的生产者与消费者模式,很明显如果要实现这个模式,我们需要创建两个线程 ...

  9. mysql数据按条件导出

    仅导出部分数据: mysqldump -hlocalhost -uuser -p --skip-triggers --no-create-info dbname tbname -w "id ...

  10. bzoj4127 Abs 树链剖分+线段树+均摊分析

    题目传送门 https://lydsy.com/JudgeOnline/problem.php?id=4127 题解 首先区间绝对值和可以转化为 \(2\) 倍的区间正数和 \(-\) 区间和.于是问 ...