Issue
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.
Solution
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.
Answered By - Szymon
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.