ejoerns
ejoerns

Reputation: 1015

Include external jar in Netbeans Android project (nbandroid)

I have tried to add an external jar to a Netbeans Android project following the hint from this site: http://www.jondev.net/articles/Adding_external_JARs_to_Android_Projects_in_Netbeans_%28nbandroid_-_kenai%29

Code:

<target name="-pre-jar"> 
  <copy todir="${build.classes.dir}"> 
    <fileset dir="/path/to/your/jar/directory" /> 
  </copy> 
</target>

But this does not work for me.

So far I've noticed that the target -pre-jar is not called. Did I miss something or is there an alternative/new method?

Upvotes: 1

Views: 1481

Answers (1)

Radim
Radim

Reputation: 4808

Your link talks about an old version of nbandroid plugin. Just put your JAR into libs directory of your project and it will be used as described in http://developer.android.com/tools/projects/index.html

Or you can set some property in one of properties files to override where the library folder is.

-Radim

Upvotes: 3

Related Questions