0

so I checked out this URL: svn checkout http://android-jhlabs.googlecode.com/svn/trunk/ that has some image filters I would like to use in my project. I made a jar file out of the checked out folder(libs folder, copy/paste the jar, add as library, etc...) However, I cannot access the java files from the inside, just the folder structures

EDIT: I use Android Studio :)

funkycookie
  • 226
  • 2
  • 16

4 Answers4

1
  1. Add jar file into the libs folder
  2. Right click it(jar file) and hit 'Add as library'

That's all. https://stackoverflow.com/a/16628496/2190621

Community
  • 1
  • 1
demir
  • 4,591
  • 2
  • 22
  • 30
  • cheers for that, tried it already :) the problem was the jar file, found another source and google and it worked – funkycookie Sep 23 '14 at 10:48
1

STEP 1: copy your jar in "libs" folder from your project.

STEP 2: open "app/build.gradle" and be sure you have this:

dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) }

STEP 3: click button "Sync Project with Gradle Files"

STEP 4: (optional) clean and build your project

ovluca
  • 291
  • 1
  • 15
0

If you use eclipse, putting the jar in the lib folder of your android project should be enough. The java files have to be added to the source tree, or you could make a separate library project containing the java files and the jar and make it a dependency if your main android project. Ok, saw the edit about using android studio, I have not used it enough (was not stable enough on linux) to give any useful advice, sorry.

FilippoDN
  • 1
  • 1
  • forgot to mention, I use Android Studio :) edited the comment, thanks! Tried that as well, but it's not working... – funkycookie Sep 23 '14 at 10:21
0

[ For Eclipse]

First of all add jar file into you project directory or libs/ directory.

Then Right click on project folder & go to Build Path -> Library -> Add JAR should allow you to pick the one out of your project.

Then go to Order & Export and put Android Private Libraries at top than press ok.

Now you can access your all java classes from jar file.

[For Android Studio]

First of all add jar file into you project directory or libs/ directory or copy & paste.

Than right click on jar file and select "Add as library".

Now you can access jar file classes.

Bhagirathsinh Gohil
  • 673
  • 1
  • 9
  • 25