Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
266 views
in Technique[技术] by (71.8m points)

android - How to make a .jar out of the Volley project?

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).
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.19 version can be found here:

http://search.maven.org/remotecontent?filepath=com/mcxiaoke/volley/library/1.0.19/library-1.0.19.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

buildintermediatesundles
elease

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...