I guess this is the simplest possible xml code for an activity and yet Android Studio gives this ambiguity error while hovering on it, I would ignore that but the final result in the IDE's layout validation and a physical device is that all those child elements of the second LinerLayout are not appearing at all not even in the blue print view.
I have tried solutions from similar posts and non worked for me: Restarted the IDE Restarted the System Cleaned the project I appreciate your help.
<?xml version="1.0" encoding="utf-8"?>
<!--1ok-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
tools:context=".Profile_activity">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.constraintlayout.widget.Barrier
android:id="@+id/Barrier_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierAllowsGoneWidgets="false"
app:barrierDirection="top"/>
<ImageView...>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinerLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:orientation="horizontal"
android:layout_marginTop="8dp">
<LinerLayout...><!--other elements folded inside it like TextVeiw-->
<!--Android message while hovering on it===>"Element LinerLayout is not allowed here"-->
<LinerLayout...><!--other elements folded inside it like TextVeiw-->
<!--Android message while hovering on it===>"Element LinerLayout is not allowed here"-->
</LinerLayout>
</LinearLayout>
I would recommend to use the IDE provided layout editor and auto suggestion, that will help you to reduce typo errors.
Just change the LinerLayout to LinearLayout this will solve your problem.