'I have a problem in my activity_main_land.xml, it displays the following error: element LinearLayout must be declared
I have a problem in my activity_main_land.xml, it displays the following error: element LinearLayout must be declared, Namespace declaration is never used
this is my code below
<Linearlayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
android:keepScreenOn="true"
android:orientation="horizontal"
tools:context="com.example.derek.myspeedalerter.MainActivity">
<fragment
android:id="@+id/setspeed_fragment"
android:name="com.example.derek.myspeedalerter.SetSpeedFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="top"
android:layout_weight="1"
tools:layout="@layout/setspeed_fragment" />
<fragment
android:id="@+id/display_fragment"
android:name="com.example.derek.myspeedalerter.DisplayFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_weight="1"
tools:layout="@layout/display_fragment" />
</Linearlayout>
Solution 1:[1]
Do you have activity_main_land.xml in the res/layout folder? Namespace declaration is never used is just a warning, because you have xmlns:tools imported, even you don't use it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Å imon Vyhnis |
