升级Android Studio后没有发布包文件夹 [英] No release bundle folder after upgrading Android Studio
问题描述
我最近用相应的 gradle 版本将我的 Android Studio 升级到了 2.3 版.
我的项目中有两个模块,我使用以下 gradle 函数将它们导出为 jar:
task createJar(type: Copy) {from('构建/中间体/捆绑包/发布/')进入('库/')包括('classes.jar')重命名('classes.jar', 'myExample.jar')}createJar.dependsOn(deleteJar, build)
<块引用>
但是升级后,这不再起作用了.在 Android Studio 中,我将 Build Variant 设置为Release",但在运行我的任务后,我的 lib 文件夹中将没有 JAR.我检查了
build/intermediates/bundles/
文件夹,没有生成发布文件夹.将只有一个default
和一个debug
文件夹.有什么办法可以再次从发布版本中获取外部 JAR?
不确定这是否是正确的解决方案,但我将其添加到 android 部分的 gradle 文件中,并且发布文件夹已返回.
publishNonDefault true
I recently upgraded my Android Studio to version 2.3 with the corresponding gradle version.
I have two modules inside my project, which i exported as a jar using gradle functions like this:
task createJar(type: Copy) {
from('build/intermediates/bundles/release/')
into('libs/')
include('classes.jar')
rename('classes.jar', 'myExample.jar')
}
createJar.dependsOn(deleteJar, build)
However after the upgrade, this does not work anymore. In Android Studio i set the Build Variant to "Release", but after running my tasks there will be no JAR in my lib folder. I checked the
build/intermediates/bundles/
folder and theres no release folder generated. There will be just adefault
and adebug
folder.Any way to get an external JAR from a release build again?
Not sure if this is the proper solution but I added this to my gradle file within the android section and the release folder has returned.
publishNonDefault true
这篇关于升级Android Studio后没有发布包文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!