Android Studio build failed at "processDebugResources" when using 9-patch images -
i following "the big nerd ranch's android programming guide" book (2nd edition) , in particular chapter (chapter 21), ask use 9-patch image image assets. until then, app wrote, called beatbox, worked fine , compiled without error.
but, when go ahead , replace drawables 9-patch image, run build error , cannot make app build. following error get:
executing tasks: [:app:generatedebugsources, :app:generatedebugandroidtestsources] configuration on demand 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: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 failed failure: build failed exception. * went wrong: execution failed task ':app:processdebugresources'. > com.android.ide.common.process.processexception: org.gradle.process.internal.execexception: process 'command 'c:\users\<username>\appdata\local\android\sdk\build-tools\23.0.2\aapt.exe'' finished non-zero exit value 1 * try: run --stacktrace option stack trace. run --info or --debug option more log output. build failed total time: 12.753 secs
i have followed exact instructions provided in book, , presume result should error free. idea why facing error?
first off little sanity boost you
aapt related bundling resources apk. great detail here including (imo) best diagram showing different build steps. aapt problem aapt.exe'' finished non-zero exit value 1
caused changing 9-patches. no need go square one, trying remember else may have changed , pulling hair out.
verification
i unable duplicate problem directly running either of root gradle tasks (:app:generatedebugsources
, :app:generatedebugandroidtestsources
). nor able duplicate problem running failing gradle task: :app:processdebugresources
.
not caused configuration on demand
it's unlikely problem caused failure in "configuration on demand". line "configuration on demand incubating feature." printed if build successful.
thoughts
it looks using latest build tools (23.0.2 of writing) versions, good.
you don't list it, i'm guessing using latest version of android-gradle plugin (since both came out @ same time , android studio defaults using latest). more info
what suggest go , start first drawable ask implement: shapedrawable
, confirm works, move on next one. pinpoint problem is.
if provide link sample too.
in future gradle-related problems can run gradle task (as did above) , add --info
flag. command line or "terminal" within android studio run (in case):
./gradlew app:generatedebugsources --info
lastly, whatever discover please post here. problem seeing isn't directly related our book , answer others.
Comments
Post a Comment