Nishant
Nishant

Reputation: 11

Using my java project jars in sbt android project

I am new to SBT Android development. I have also no previous experience with sbt.

I have a java project jar. I want to use it in my sbt android project. I dont know where to place the jar file as when i do package-debug, the console gives error saying

"not found: jarfile" (jarfile is the name of the jar file of the java project)

Please suggest where to place the jar file and changes to be made in any of the project files.

My project directory structure is:

checkscala--lib_managed
                      scala2.8.1
                           test
------------project
                  boot
                     other
                     scala2.7.7
                     scala2.8.1
                  build
                     target
                        scala2.7.7
                        project.scala
                  plugins
                  build.properties
------------src
                  main
                      assets
                      java
                      res
                      scala
                  test
-----------src_managed
-----------target
-----------tests

Upvotes: 1

Views: 585

Answers (2)

Daniel C. Sobral
Daniel C. Sobral

Reputation: 297295

Just copy the JAR to a lib/ directory inside the project. See Library Management in the wiki, and the Directory Layout section of the Setup wiki.

Upvotes: 3

Nikhil
Nikhil

Reputation: 16194

Put the JAR in your project's libs/ directory. Then Build Path -> Library -> Add JAR should allow you to pick the one out of your project. IIRC, this works with Eclipse.

If you decide someday to dump Eclipse, just having your JAR in libs/ is enough -- the command-line build tools will pick it up automatically.

Upvotes: 0

Related Questions