gradle command line, no details on build failure

289 views Asked by At

I started recently on Android and after losing my patience with build times on Android Studio, decided to try command line option(initial reading on internet indicated 50% reduction in time required). I was able to install apk to the device and even launch an activity from command line.

On speed, felt like some improvement...

I was happy to have learnt something new and understand more about gradle until I made a change in layout and forgot to include the id in the ids.xml. gradle command wont reveal the file in which the error exists(id not assigned) but indicates the line number and resource name.

Given below is the error:

:TestProject:fabricGenerateResourcesDebug
:TestProject:processDebugResources
 Position 68:21-44 : No resource found that matches the given name (at 'id' with value '@id/FrameLayoutOuter').

:TestProject:processDebugResources FAILED

FAILURE: Build failed with an exception.

Following is the command that was tried

gradlew assembledebug

If I compile the same project using Android Studio it shows all the details including the file name for me to act on. Using --info or --debug or --stacktrace does not change anything from command line.

Anyone else noticed this.. Is this a bug or I am missing something?

And I got the following option

UPDATE 1 Adding Android Studio output

  • From Messages Gradle Build

    C:\src\TRUNK\mobileapps\android\TestProject\res\layout\activity_framed.xml Error:(68, 21) No resource found that matches the given name (at 'id' with value '@id/FrameLayoutOuter').

  • Gradle Console Output

    :Testproject:processDebugResources AGPBI: {"kind":"ERROR","text":"No resource found that matches the given name (at \u0027id\u0027 with value \u0027@id/FrameLayoutOuter\u0027).","sourcePath":"C:\src\TRUNK\mobileapps\android\TestProject\res\layout\activity_framed.xml","position":{"startLine":68,"startColumn":21,"startOffset":2499,"endColumn":44,"endOffset":2522},"original":""}

0

There are 0 answers