An error occurred while changing images and other resource files.

Source: Internet
Author: User

An error occurred while changing images and other resource files.

For example, I haven't done any UI-related applications for a long time, and I almost forgot how to deal with the UI-related problems. Make a note here, and you have to check the information everywhere when the province goes wrong. When an error occurs in a resource file or resource file such as an image, the following error occurs:

Error: Execution failed for task': app: mergeDebugResources '.

> Error: java. util. concurrent. ExecutionException: com. android. ide. common. process. ProcessException :.

Solution:

1. Exclude compilation errors first. Xml and other files may have errors, so correct them.

2.image resource error: I replaced ic_launcher.png with the reported error. I directly set it in the build. gradle file and do not check it. As shown in red ):

apply plugin: 'com.android.application'android {    compileSdkVersion 26    buildToolsVersion "27.0.3"    aaptOptions.cruncherEnabled = false    aaptOptions.useNewCruncher = false    defaultConfig {        applicationId "com.demo"        minSdkVersion 16        targetSdkVersion 21        versionCode 1        versionName "1.0"        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }    }}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.