简体   繁体   English

Android Studio XML代码问题

[英]Android Studio XML code issue

why do I get xmlns: android="http://schemas.android.com/apk/res/android" 为什么我得到xmlns:android =“ http://schemas.android.com/apk/res/android”

after the text view class when I'm trying to run the basic XML code? 在尝试运行基本XML代码时,在文本视图类之后?

On android studio, it runs fine with it, but on Udacity ( where I'm learning from ) it's not a part of code. 在android studio上,它可以很好地运行,但是在Udacity(我正在从中学习)上,它不是代码的一部分。

When you use android:id="@+id/yourViewId" You are actually calling: http://schemas.android.com/apk/res/android:id 当您使用android:id =“ @ + id / yourViewId”时,您实际上是在呼叫: http : //schemas.android.com/apk/res/android :id

You can also call other namespaces like app and tools. 您还可以调用其他名称空间,例如应用程序和工具。

You can find more information here: Android XML Namespaces 您可以在此处找到更多信息: Android XML命名空间

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM