error: Error parsing XML: unbound prefix 与 error: Invalid start tag LinearLayout 问题解决
16lz
2021-01-26
在写android 程序时总会遇到此类问题 error: Error parsing XML: unbound prefix 和 error: Invalid start tag LinearLayout 错误.
第一个问题原来发现是android写错了,下面是我写错的xml文件.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<Button
android:id="@+id/myButton1"
adnroid:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/str_button1"
/>
</LinearLayout>
很隐蔽:)
第二个问题是因为main.xml文件放错位置,汗.
下面是上传上来的图片,希望可以借鉴,避免此类问题的发生.
更多相关文章
- android 模拟器手机如何添加文件到sd卡?
- Android(安卓)ListView动画(逐行显示动画效果)
- Android(安卓)studio的那些坑- so文件添加的正确位置
- Android(安卓)ADB详细介绍及用法
- Android应用程序四大组件之使用AIDL如何实现跨进程调用Service
- 从assets文件夹中读取文件
- Android(安卓)OpenCV_face使用OpenCV3.20的一个免安装OpenCV Man
- android图像与图像处理系列(一、Bitmap和BitmapFactory)
- Android-webview教程一