freeline集成

1.在项目的build.gradle中添加

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.antfortune.freeline:gradle:0.6.3'
}
}



2.在项目主module的build.gradle中添加

apply plugin: 'com.antfortune.freeline'

android{

...

freeline {
        hack true
    }

}

dependencies{

...

debugCompile 'com.antfortune.freeline:runtime:0.6.3'
   
     releaseCompile 'com.antfortune.freeline:runtime-no-op:0.6.3'
   
    testCompile 'com.antfortune.freeline:runtime-no-op:0.6.3'

}



3.在Applincation中的oncreate添加

FreelineCore.init(this);


4.下载python(2.7+,貌似不支持3.0以上版本)


5.使用方法

a.打开命令行,进入到项目根目录

b.gradlew.bat initFreeline,如果中途下载卡住,可以使用gradlew initFreeline -Pmirror

c.python freeline.py,之后修改过文件也需要执行python freeline.py编译,如果需要重新编译整个项目,可以python freeline.py -f


ps:

a.已知freeline与android-build-tools 1.3.2不兼容,所以最好使用较高版本

b.项目路径和sdk,jdk路径中不要出现中文

c.如果项目启用了混淆,需要先把混淆关闭掉







freeline原理链接:https://yq.aliyun.com/articles/59122

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值