Android studio 3.0 引起的 outputFile sync failed:not vaild
来源:互联网 发布:avmo.pw最新域名 编辑:程序博客网 时间:2024/06/15 06:28
在Android studio 3.0 之前 我们自定义apk名称使用如下方式:
applicationVariants.all { variant -> variant.outputs.each { output -> output.outputFile = new File(output.outputFile.parent, variant.applicationId + "-" + buildType.name+"-" +defaultConfig.versionName + "-" + defaultConfig.versionCode + "-${releaseTime() }.apk" ); } }
但是更新到as3.0以后,会同步失败。stackoverflow上有人(http://stackoverflow.com/questions/44044031/grade-plugin-3-alpha1-outputfile-causes-error)说:
This build error occurs because variant-specific tasks are no longer created during the configuration stage.
This results in the plugin not knowing all of its outputs up front, but it also means faster configuration times.
As an alternative, we will introduce new APIs to provide similar functionality.
查询官网介绍:https://developer.android.com/studio/preview/features/new-android-plugin-migration.html#variant_api
API change in variant output
解决方案:
applicationVariants.all { variant -> variant.outputs.all { output -> outputFileName=" ${variant.applicationId}- ${ buildType.name}- ${defaultConfig.versionName}-${ defaultConfig.versionCode }-${releaseTime() }.apk" } }
阅读全文
0 0
- Android studio 3.0 引起的 outputFile sync failed:not vaild
- Android studio 3.0 引起的自定义打包文件名 outputFile sync failed
- Android studio的 gradle project sync failed
- Ubuntu下Android Studio Gradle sync failed peer not authenticated
- Android studio: Gradle sync failed
- Android Studio,“Failed to sync Gradle project 'xxxx' ”的解决
- Android Studio Error: Gradle project sync failed
- Android Studio Gradle project sync failed
- android studio 提示"Gradle project sync failed."
- android studio 提示 “Gradle project sync failed”
- android studio 提示"Gradle project sync failed."
- android studio使用日记-Gradle sync failed
- Android Studio,gradle project sync failed 错误
- Android studio 报错 gradel project sync failed Error:Cause: peer not authenticated
- 解决Android Stuio 的Gradle sync failed: Gradle DSL method not found: 'android()'
- Android Studio Gradle project sync failed,Gradle sync failed: Unable to start the daemon process.
- 使用android studio导入之前版本系统的project sync failed 解决办法
- 使用android studio导入之前版本系统的project sync failed 解决办法
- 程序员跳槽神级攻略
- http乱码问题
- 边框(Border) 和 轮廓(Outline) 属性
- chrome插件简介
- json格式与javascript对象字面量和数组对象的区别
- Android studio 3.0 引起的 outputFile sync failed:not vaild
- kotlin和DataBinding一起使用踩坑日记
- G2.9 std_alloc
- solr erro no term info available
- preparedStatement和statement,CallableStatemen的区别与联系
- springMVC返回json格式数据报错:No converter found for return value of type: class java.util.HashMap
- Java 利用 DES / 3DES / AES 三种算法分别实现 对称加密
- 指针
- vue-awesome打包报错