proguard.cfg

问题:

I have a app that uses ActiveAndroid, a database ORM library that relies on annotations.

@Table(name="test")
public class DatabaseItem extends ActiveRecordBase<databaseitem> {

public DatabaseItem(Context context) {
super(context);
// TODO Auto-generated constructor stub
}

@Column(name="counter")
public int counter;

}
What would I need to do to get Proguard working nice with this? Currently I get errors about not finding a column name by activeandroid when using proguard. I guess it somehow mangles the annotation.

My relevant proguard cfg:

#ActiveAndroid
-keep public class com.activeandroid.**
-keep public class * extends com.activeandroid.ActiveRecordBase
-keepattributes Column
-keepattributes Table

=========================================================================
Solution was to keep all members of the library and the database classes

-keep class com.activeandroid.**
{
*;
}
-keep public class my.app.database.**
{
*;
}
-keepattributes Column
-keepattributes Table

Column and Table aren't existing java class file attributes. You'll at least have to specify

-keepattributes *Annotation*</databaseitem>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值