我是新来的android开发,并正在读它的书(开始android 4开发),同时创建hello世界我陷入了一些错误,首先我解决了他们,但我的应用程序是强制关闭所以我复制粘贴的所有事情,并得到了4个错误: -错误在你好世界xml
Multiple annotations found at this line: - Attribute is missing the Android namespace prefix - Suspicious namespace: should start with http:// - Open quote is expected for attribute "xmlns:android" associated with an element type "LinearLayout". - error: Error parsing XML: not well-formed (invalid token)
Unexpected namespace prefix "android" found for tag TextView
Multiple annotations found at this line: - Unexpected namespace prefix "android" found for tag TextView - Attribute is missing the Android namespace prefix
Unexpected namespace prefix "android" found for tag Button
代码示例
<?xml version ="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/ android”
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_orientation="vertical"
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
<TextView
android:layout_width=”fill_parent”
android:layout_height=”wrap_content”
android:text=”@string/This is my first Android Application!” />
<Button
android:layout_width="fill_parent"
android:layout_width="wrap_content"
android:text="@string/And this is clickable :D" />
我不认为有一个在代码中的任何错误:/
是上述xml相同,在书中,我真的怀疑这一点。 – Thalaivar