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