New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failed with an exception #33
Comments
@zeng1990java 项目中是否有指定的flavor呢?有的话需要配置一下..例如: freeline {
hack true
productFlavor "dev"
} |
有, |
@zeng1990java 你们平时的打包命令是什么呢?比如如果是 freeline {
hack true
productFlavor "fir"
} |
多谢,成功了,但是耗时还是一样的,看输出主要是install apk和clean build task和耗时很多,你看正常吗 |
@zeng1990java 你可以修改一下代码再执行一下 freeline并不加速全量编译,主要是加速增量编译。在增量编译前,需要有一个全量编译的底包作为基线包。经过一次全量编译后,再执行 |
zxbdeMBP:FreelineDemo zxb$ python freeline.py |
@zeng1990java 看日志提示猜测你的目标设备上装了多个依赖freeline的app,这个会导致基线对齐失败重新打全量包。估计目标设备上还安装了freeline sample这个app,可以卸载掉后重新试试看。 |
对,我把其他使用了freeline的Demo项目删除后就是可以了,非常感谢你的解答 @lomanyong |
@zeng1990java 方便的话在你们的项目试试,看看增量模式下,资源或代码修改耗时多少,跟你们原来相比如何 |
@charvenhe 集成了,小改动的话2秒以内。但是好像不支持打包的时候改包文件名称,需要注释掉如下代码 applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
def outputDirPath = project.hasProperty('outputPath') ? outputPath : outputFile.parent
if (outputFile != null && outputFile.name.endsWith('.apk')) {
def fileName
if(project.hasProperty('outputPath')){
// 输出apk名称为Merchant_v1.0_SoftwareUpdate_release.apk
fileName = "Merchant_v${defaultConfig.versionName}_${variant.productFlavors[0].name}_${variant.buildType.name}.apk"
}else{
// 输出apk名称为Merchant_v1.0_2015-01-15_SoftwareUpdate_release.apk
fileName = "Merchant_v${defaultConfig.versionName}_${releaseTime()}_${variant.productFlavors[0].name}_${variant.buildType.name}.apk"
}
output.outputFile = new File(outputDirPath, fileName)
}
}
} |
@zeng1990java ,apk path 你可以通过DSL指定 freeline { |
可以了,多谢 @charvenhe |
@zeng1990java 不客气,可以在你们项目多试试,资源增量也试试看看有没问题 |
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeFirDebugAssets'.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
The text was updated successfully, but these errors were encountered: