0

I imported a jar file that I created with Eclipse to my Android Studio library but I don't know how to use the classes from it. Imported it here and I'm now trying to use the logarithm class

I tried to somehow get it with the import word on the beginning of a class but I don't get it to work. Sorry I'm a beginner. :p

1 Answers1

0

Ok follow this:

  1. Put the .jar into the libs folder
  2. Put compile files('libs/your.jar') is in your build.gradle file (or compile fileTree(dir: 'libs', include: '*.jar') if you are using many jar files)
  3. Do a clean build (you can probably do this fine in Android Studio, but to make sure I navigated in a terminal to the root folder of my app and typed gradlew clean. If this does not work then use the terminal tab and do this: gradlew clean.

    Hope it helps!!!

Kostas Drak
  • 3,222
  • 6
  • 28
  • 60