Fixed
Status Update
Comments
jg...@google.com <jg...@google.com>
je...@google.com <je...@google.com>
lu...@google.com <lu...@google.com> #2
Since the error message is thrown from the Java XML library, the message thrown can't be modified. If we want to first display the ResourceCompilationException that includes the XML (Android resource) file (that rethrows the XMLStreamException), the output window will need to change focus to show RCE exception as default.
lu...@google.com <lu...@google.com>
ml...@google.com <ml...@google.com>
an...@google.com <an...@google.com> #3
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Meerkat Feature Drop | 2024.3.2 Canary 1
- Android Gradle Plugin 8.10.0-alpha01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
When I compile, the build output window does not point to the build error; I just see
```
ParseError at [row,col]:[5,44]
Message:
```
When I expand the whole output, I see this output:
```
Executing tasks: [:app:assembleDebug] in project /Users/tnorbye/AndroidStudioProjects/MyApplication39
Starting Gradle Daemon...
Gradle Daemon started in 594 ms
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
> Resource compilation failed (Failed to compile resource file: /Users/tnorbye/AndroidStudioProjects/MyApplication39/app/src/main/res/layout/layout.xml: . Cause: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[5,44]
Message:
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at
BUILD FAILED in 15s
24 actionable tasks: 24 executed
```
So the path is in there but doesn't get pulled out in the error parser.
Here's the broken layout.xml file:
```
<?xml version="1.0" encoding="utf-8"?>
<androidx.camera.view.PreviewView
android:id="@+id/preview_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
```
(it's missing the xmlns:android attributes)