如何使的.jar了排球项目的? [英] How to make a .jar out of the Volley project?

查看:143
本文介绍了如何使的.jar了排球项目的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何做一个.jar文件出了排球项目(的git库)?

我试图按照这个答案,但运行 Android的更新项目 - P 在克隆抽射文件夹引发此错误:

 错误:不是有效的项目(AndroidManifest.xml中未找到)。
 

解决方案

的构建过程凌空已更改为摇篮。如果你只是想使用的库没有建立它,你可以从Maven的获得JAR或向下滚动,以说明自己下构建它的这个答案。

的Maven

这是更简单的方式来获得的Jar文件是直接从Maven的中央下载。你可以找到最新的版本与此搜索:

HTTP://search.maven .ORG /#查找%7Cga%7C1%7CG%3A%22com.mcxiaoke.volley%22

在撰写1.0.16版的时候可以在这里找到:

<一个href="http://search.maven.org/remotecontent?filepath=com/mcxiaoke/volley/library/1.0.16/library-1.0.16.jar" rel="nofollow">http://search.maven.org/remotecontent?filepath=com/mcxiaoke/volley/library/1.0.16/library-1.0.16.jar


摇篮

新的方式来做到这一点是使用摇篮来构建项目。

您可以通过运行做到这一点:

  git的克隆https://android.googlesource.com/platform/frameworks/volley
摇篮构建
 

这将创建一个文件

 打造\中间体\包\发布
 

然后将此文件添加到您的库文件夹,并把它添加到您的项目。

How do I make a .jar file out of the Volley project (git repository)?

I have tried to follow the instructions in this answer, however running android update project -p . in the cloned volley folder throws this error:

Error: . is not a valid project (AndroidManifest.xml not found).

解决方案

The build process for Volley has changed to Gradle. If you just want to use the library without building it, you can get the Jar from Maven or scroll down to the instructions to building it yourself lower in this answer.

Maven

An easier way to obtain the Jar file is to download it directly from Maven Central. You can find the latest version with this search:

http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.mcxiaoke.volley%22

At the time of writing the 1.0.16 version can be found here:

http://search.maven.org/remotecontent?filepath=com/mcxiaoke/volley/library/1.0.16/library-1.0.16.jar


Gradle

The new way to do it is to build the project using Gradle.

You can do this by running:

git clone https://android.googlesource.com/platform/frameworks/volley
gradle build

This will create a file in

build\intermediates\bundles\release

Then add this file into your libs folder and add it to your project.

这篇关于如何使的.jar了排球项目的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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