0

I am getting this error from build-tools\23.0.2\ (Aapt.exe)

finished with non zero exit value 1.

I am using Android Studio Version 1.4.1

I am using the API level 23 with the updated build tools, and my log cat is often meaning out the string.xml where I created my strings to refer it for the list view.

Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugAndroidTestSources, :mylibrary:generateDebugSources, :mylibrary:generateDebugAndroidTestSources, :mylibrary:compileDebugSources, :mylibrary:compileDebugAndroidTestSources]

Configuration on demand is an incubating feature. :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE :app:prepareComAndroidSupportDesign2311Library UP-TO-DATE :app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig 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 UP-TO-DATE :app:processDebugManifest UP-TO-DATE :app:processDebugResources AGPBI: { "kind":"error","text":"Apostrophe not preceded by \ ( in ithin the lifecycle callback methods, you can declare how your activity behaves when the user leaves and re-enters the activity. For example, if you\u0027re building a streaming video player, you might pause the video and terminate the network connection when the user switches to another app. When the user returns, you can reconnect to the network and allow the user to resume the video from the same spot. )", "sources":[ {"file":"C:\Users\PreciseT3\AndroidStudioProjects\ListviewApp1\app\src\main\res\values\strings.xml","position": { "startLine":1}}],"original":""}

FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:processDebugResources'.

    com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\PreciseT3\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 12.649 secs

Stefan
  • 5,203
  • 8
  • 27
  • 51
Dineshkumar V
  • 27
  • 2
  • 9

2 Answers2

0

Problem is in your string.xml

find all occurrences of single-quote (') or apostrophe and add a back-slash escape character (\) before each occurrence.

XML cannot deal with (')

Basically, replace all ' with \'

Viral Patel
  • 32,418
  • 18
  • 82
  • 110
  • Thanks for your Solution......Actually i found it early....By the way thanks for your valuable reply towards my confusion.... – Dineshkumar V Jan 28 '16 at 14:01
0

Compare your gradle file I hope this work

 apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.2'

    defaultConfig {
        applicationId "info.tranetech.laundry"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
android {
    useLibrary 'org.apache.http.legacy'
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:recyclerview-v7:+'
    compile 'com.android.support:cardview-v7:+'
    compile 'com.android.support:design:23.0.1'
    compile 'com.squareup.picasso:picasso:+'
    testCompile 'junit:junit:4.12'
    compile 'com.facebook.android:facebook-android-sdk:4.0.0'
    compile files('libs/android-async-http-1.4.4.jar')
    compile 'com.google.android.gms:play-services:8.4.0'
}
Arpit Patel
  • 7,212
  • 5
  • 56
  • 67