This is my layout:
<?xml version="1.0" encoding="utf-8"?>
<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"
android:orientation="horizontal" >
</LinearLayout>
Taked from the android official training
In the second line, AndroidStudio shows this warning:
Namespace declaration is never used
Why this happens?
Thank you.
This is because you don't have anything with tools
namespace actually declared in your xml.
Look at the android
namespace, you have 3 elements with that namespace, but none for tools
.
The namespace tools
(http://schemas.android.com/tools) is used for the GUI designer and is not used for running apps on Android devices so you can safely remove it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With