.jar文件未在android studio中生成 [英] .jar file not generating in android studio

查看:89
本文介绍了.jar文件未在android studio中生成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在工作的项目需要另一个项目的.jar文件. 我正在使用android studio 2.3.3. 以下是生成.jar文件的代码

I'm working project which requires another project's .jar file. I'm using android studio 2.3.3. Following is code to generate .jar file

task clearJar(type: Delete) {
delete 'build/outputs/NAME.jar'}

task makeJar(type: Copy) {
from('build/intermediates/bundles/release/')
into('build/outputs/')
include('classes.jar')
rename ('classes.jar', 'NAME.jar')}

makeJar.dependsOn(clearJar, build)

当我编译一个项目并调用makeJar时,它执行成功,但是我无法在所需位置找到NAME.jar. .aar文件已生成,但我想要.jar文件. 请帮助我找到一种方法.

When i compile a project and call makeJar it executes successful, but I'm unable to find NAME.jar at desired location. .aar file is generated, but i want .jar file. Please help me to find a way.

推荐答案

我之前也遇到过同样的问题,我通过清除无效的缓存并重新启动Studio来解决了这个问题.

I was facing the same problem earlier, I resolved it by clearing invalidated cache and restart studio.

转到文件->使缓存无效并重新启动. 这需要时间.

Go to file -> Invalidate caches and restart. It will take time.

这篇关于.jar文件未在android studio中生成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆