android Studio翻墙编译

作者: Ovadyah | 来源:发表于2016-11-16 15:23 被阅读566次

配置翻墙环境

安装Python,配置其环境命令

root :

dependencies {

classpath 'com.android.tools.build:gradle:2.1.0'

classpath 'com.antfortune.freeline:gradle:0.8.1'

// NOTE: Do not place your application dependencies here; they belong

// in the individual module build.gradle files

}

application moudle :

apply plugin: 'com.antfortune.freeline'

android{

.....

freeline {

hack true

}

}

最底层的moudle(GFrame)或者Application所在的moudle:

dependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])

testCompile 'junit:junit:4.12'

compile 'com.android.support:appcompat-v7:23.4.0'

compile 'com.antfortune.freeline:runtime:0.8.1'

}

自定义的 Application:

public class App extends Application {

@Override

public void onCreate() {

super.onCreate();

FreelineCore.init(this);

}

}

第一次:

在当前工作目录下 执行:

gradle initFreeline -Pmirror

success ->

python命令 python freeline.py

第二次以后:

python命令 freeline.py

note:

不要混淆代码

使用Freeline打包,能加快打包速度,但是手动gradle同步的时候,速度不能减少

最后说明:项目的名字不能带特殊符号"-"或者"_"

相关文章

网友评论

    本文标题:android Studio翻墙编译

    本文链接:https://www.haomeiwen.com/subject/ddjrpttx.html