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






评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值