Jeongmyeong Lee
Jeongmyeong Lee

Reputation: 157

Error:Execution failed for task ':app:mergeDebugResources'. > -1

Whenever I run, make, or clean project,

Error:Execution failed for task ':app:mergeDebugResources'.> -1

this error message comes out.

I've checked my resource files several times, and there was no fatal error. There are only png icons and xml files.

I don't know what the '-1' means..

And in my main java files, there are 'cannot resolve symbol R' errors.

My app have launched well last night, but when I wake up and run android studio this morning, it failed.

What should I do?

Here is my gradle

apply plugin: 'com.android.application'


 android {
compileSdkVersion 24
buildToolsVersion "24.0.1"

defaultConfig {
    applicationId "com.exapmle.rantalk"
    minSdkVersion 21
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.1.1'
compile 'com.android.support:design:24.1.1'
compile 'com.android.support:cardview-v7:24.1.1'
compile 'com.android.support:recyclerview-v7:24.1.1'
compile 'com.android.support:support-v4:24.1.1'
compile 'com.android.support:support-v13:24.1.1'}

Here below, I added my entire gradle output, thanks.

Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:compileDebugSources, :app:compileDebugAndroidTestSources, :app:compileDebugUnitTestSources]

Configuration on demand is an incubating feature. Incremental java compilation is an incubating feature. :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2411Library UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72411Library UP-TO-DATE :app:prepareComAndroidSupportCardviewV72411Library UP-TO-DATE :app:prepareComAndroidSupportDesign2411Library UP-TO-DATE :app:prepareComAndroidSupportRecyclerviewV72411Library UP-TO-DATE :app:prepareComAndroidSupportSupportV132411Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42411Library UP-TO-DATE :app:prepareComAndroidSupportSupportVectorDrawable2411Library UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:mergeDebugShaders UP-TO-DATE :app:compileDebugShaders UP-TO-DATE :app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 7.62 secs

Upvotes: 0

Views: 3229

Answers (2)

Jeongmyeong Lee
Jeongmyeong Lee

Reputation: 157

Now I'm find that my styles.xml file has a problem... I deleted styles and remake it, now my app works. thanks for comments, guys.

Upvotes: 1

SaravInfern
SaravInfern

Reputation: 3388

:app:mergeDebugResources may be thrown due to an issue with your resource file check in your drawables/resources whether you have numerical or caps in the name

Upvotes: 3

Related Questions