# android.view.InflateException: Binary XML file line #XX: Binary XML file line #XX: Error inflating class androidx.constraintlayout.widget.ConstraintLayout. Cause: java.lang.IllegalArgumentException: The given output must be a different layout from the input. Parallel constraints not supported.

- **ID:** `android/layout-inflate-constraintlayout-parallel-constraint`
- **Domain:** android
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

ConstraintLayout XML contains conflicting or parallel constraints (e.g., both `layout_constraintLeft_toLeftOf` and `layout_constraintRight_toRightOf` on the same view without proper chain or bias) that the layout parser cannot resolve during inflation.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| ConstraintLayout 2.1.4 | active | — | — |
| ConstraintLayout 2.2.0 | active | — | — |
| AndroidX 1.6.0 | active | — | — |

## Workarounds

1. **In your XML layout, identify the view causing the error and remove one of the parallel constraints. For example, if a TextView has both `app:layout_constraintLeft_toLeftOf="parent"` and `app:layout_constraintRight_toRightOf="parent"`, replace them with `app:layout_constraintStart_toStartOf="parent"` and `app:layout_constraintEnd_toEndOf="parent"` to create a centered horizontal constraint, or use a chain with `app:layout_constraintHorizontal_chainStyle="packed"`.** (90% success)
   ```
   In your XML layout, identify the view causing the error and remove one of the parallel constraints. For example, if a TextView has both `app:layout_constraintLeft_toLeftOf="parent"` and `app:layout_constraintRight_toRightOf="parent"`, replace them with `app:layout_constraintStart_toStartOf="parent"` and `app:layout_constraintEnd_toEndOf="parent"` to create a centered horizontal constraint, or use a chain with `app:layout_constraintHorizontal_chainStyle="packed"`.
   ```
2. **Wrap the conflicting view in a nested ConstraintLayout or use a different layout container like LinearLayout to avoid parallel constraints entirely.** (85% success)
   ```
   Wrap the conflicting view in a nested ConstraintLayout or use a different layout container like LinearLayout to avoid parallel constraints entirely.
   ```

## Dead Ends

- **** — The Layout Editor often generates parallel constraints automatically when dragging; manual removal without understanding the conflict can reintroduce the same error. (80% fail)
- **** — The error is a validation issue in the XML, not a library bug; downgrading may hide the symptom but the underlying constraint conflict remains and can cause runtime crashes. (85% fail)
