android的莫名其妙的事
1. 运行时报activity对应的class找不到,查文件在,编译没问题,AndroidManifest.xml 配置的activity也没有问题,最后发现是调用的lib文件没有包括进来(Java Build Path->order and Export 需选中相关的lib)
2. xml报属性没有
例子:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="AntipodalWallAttrs">
<!-- android attrs -->
<attr name="android:columnCount"/>
<attr name="android:fadeScrollbars"/>
<attr name="android:horizontalSpacing"/>
<attr name="android:isScrollContainer"/>
<attr name="android:padding"/>
<attr name="android:paddingBottom"/>
<attr name="android:paddingLeft"/>
<attr name="android:paddingRight"/>
<attr name="android:paddingTop"/>
<attr name="android:saveEnabled"/>
<attr name="android:scrollY"/>
<attr name="android:scrollbarFadeDuration"/>
<attr name="android:scrollbarSize"/>
<attr name="android:scrollbarStyle"/>
<attr name="android:scrollbarThumbHorizontal"/>
<attr name="android:scrollbarThumbVertical"/>
<attr name="android:scrollbarTrackHorizontal"/>
<attr name="android:scrollbarTrackVertical"/>
<attr name="android:scrollbars"/>
<attr name="android:verticalSpacing"/>
</declare-styleable>
</resources>
编译报错:
[2013-05-29 12:14:05 - AntipodalWall] ERROR: In <declare-styleable> AntipodalWallAttrs, unable to find attribute android:columnCount
原因:
API Level 14 才有这个属性
http://developer.android.com/reference/android/widget/GridLayout.html
更多相关文章
- android下的modeul下的build_gradle详解
- Android图形动画概述
- 自定义android Rating bar
- Eclipse中跟踪调试Android(安卓)Framework源代码
- Android(安卓)- shape不完整的圆环(ring)
- Android自定义控件的实现
- android的makefile 特有的 dd
- Ubuntu编译ijkplayer支持https和更多视频格式
- Android(安卓)Material Design新UI控件使用大全 三