-2

i have downloaded the zxing library from github. i want to increase the size of the qrcode scanning window & export the zxing library as a jar to be re-used. How to create a jar from zxing project. I has many folders.

An SO User
  • 24,612
  • 35
  • 133
  • 221
yokks
  • 5,683
  • 9
  • 41
  • 48

2 Answers2

0

How to create a jar from zxing project.

You can add the library project to your classpath directly.

  1. File->New->Other
  2. Select Android Project
  3. Select "Create Project from existing source"
  4. Click "Browse..." button and navigate to wherever your zxing project is
  5. Finish
  6. Right-click on your project -> Properties
  7. In Android->Library section click Add
  8. select recently added project -> Ok
  9. that's it!

From: How to add a Library Project to a android project?

i want to increase the size of the qrcode scanning window

What have you tried so far ?

Community
  • 1
  • 1
An SO User
  • 24,612
  • 35
  • 133
  • 221
  • i want to make changes in the zxing library for android & export it as jar to be imported as phonegap plugin. my doubt is, where i have to make changes & how to export is as jar to be reused as a phonegap plugin. Am bit confused of its folder structure? should i have to use maven or ant or eclispe(only GUI) is enough to build it? – yokks May 06 '14 at 04:50
  • @yokks First, just use the "export" option in Eclipse to export it to a JAR (not a runnable JAR) and see how that goes for you :) – An SO User May 06 '14 at 05:19
0

For creating jar, steps you needed are:
1- Import your zxing project that you have downloaded to your workspace.
2- After successful import, right click on your zing project.
3- Go to Properties -> Android window
4- Click check on isLibrary option
5- After implementing above 4 steps, you will find zxing.jar in your zxing android library project inside bin folder
6- You can use/copy this jar in your own android project as a library jar file.
7- However, you have to copy assets & other resources from zxing library project to your project as created jar only contains source files & as of now, Android doesn't support including resources file in jar creation.

Hope this solution may be of your some help.

Amrit Pal Singh
  • 7,116
  • 7
  • 40
  • 50