mac android studio freeline 踩到的坑

执行:

./gradlew initFreeline -Pmirror 

报错

FAILURE: Build failed with an exception.

* Where:
Build file '省略号/build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':app'.
> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

[ERROR] --------------------------------------------------------
[ERROR] freeline failed when read project info with script: ./gradlew -q checkBeforeCleanBuild
[ERROR] --------------------------------------------------------
[DEBUG] Prepare tasks time: 0.2s
[DEBUG] Task engine running time: 2.1s
[DEBUG] Total time: 2.3s
[DEBUG] --------------------------------------------------------

然后各种猜测,各种不对。。。

最后在android studio 的命令行输入:java -version,发现是java版本是1.7。迅速改成1.8,修改方法:

https://jingyan.baidu.com/article/d2b1d1029c1ea65c7e37d4c9.html


记着,在android studio的命令行中输入:

source ~/.bash_profile
使其生效。在freeline命令行中同样要执行本句。


然后重新执行:

./gradlew initFreeline -Pmirror 

一路畅通,最终看到

BUILD SUCCESSFUL

Total time: 20.945 secs
------------------------------------------------------------------------------------------------------

然后在执行 freeline,继续出现问题:

 What went wrong:
Execution failed for task ':app:mergeLocalDebugAssets'.
> 省略号/app/build/intermediates/assets/debug/apktime file not found. 
  Missing the `productFlavor` configuration?
  You can try to add `productFlavor` to freeline DSL, for example: 
  
    freeline { 
        hack true 
        productFlavor 'your-flavor' 
    }
  
  Then re-run `python freeline.py` again.


偷懒了,看这个博文:

http://blog.csdn.net/yk377657321/article/details/53694306

好了



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值