在LinearLayout添加滚动效果的时,代码如下:

<?xml version="1.0" encoding="utf-8"?><ScrollViewandroid:layout_width="fill_parent"android:layout_height="fill_parent"android:scrollbars="vertical"android:fadingEdge="vertical"><LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"  android:layout_width="fill_parent"  android:layout_height="fill_parent"  android:orientation="vertical"  android:scrollbarStyle="outsideInset"  android:scrollbars="vertical">

结果保存的时候提示:acount_manage_activity.xml:2: error: Error parsing XML: unbound prefix

acount_manage_activity.xml:2就是代码的第二行

后发现

xmlns:android="http://schemas.android.com/apk/res/android"

必须作为第一个节点的属性,即将LinearLayout的xmlns:android属性去掉,ScrollView加上xmlns:android属性。

网上还有错误为

android:layout_width="fill_parent"

写成

Android:layout_width="fill_parent"

参考:

http://stackoverflow.com/questions/2221221/frequent-problem-in-android-view-error-parsing-xml-unbound-prefix

更多相关文章

  1. 让背景小图不是拉伸而是多个重复
  2. Android禁止锁屏,保持常亮方法
  3. Android(安卓)P Camera架构
  4. android 之 布局属性--RelativeLayout
  5. Android(安卓)Studio 快捷键
  6. Android(安卓)动态设置布局属性
  7. android动态给view设置可见、不可见属性
  8. 让背景小图不是拉伸而是多个重复
  9. windowSoftInputMode属性设置值

随机推荐

  1. Android(安卓)MVVM最简易举例(ViewModel&L
  2. Android开发EditText属性
  3. Android项目中疑难杂症(千问)
  4. android中限制EditText最大输入字节数
  5. ViewPager
  6. Activity为singleTask模式时的生命周期
  7. 软键盘弹出影响布局
  8. Android(安卓)接收开机广播启动service/a
  9. Android中Spinner根据value来选择选中项
  10. android 多线程 — IntentService