android Studio翻墙编译

配置翻墙环境

安装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同步的时候,速度不能减少

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容