title: Android import library
body: <p>In my project, I need to use external library. That library consists of <code>.class</code> files. I have added folder with this library to my project using <strong>properties -> Java Build Path -> Libraries -> Add class folder</strong>. I can compile project without any problem, but when I run it, I get <code>failed resolving xy</code> and debugger stops on line where I create instance of class from imported files.</p>
  
  <p>I guess the external library I use isnt linked to my .apk file. How can I fix this? I have tried to check this library on "Order and Export" tab assuming that, it will export the library with my application. But it didnt work.</p>
  
  <p>How can I link this library to my project .apk? Do I need to somehow install this library on device first? Do I need to copy this library in application folder?</p>
  
  <p>PS: I'm using Eclipse Juno, android SDK target 10.</p>
  
  <p>Thank you</p>
  
  <hr>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have this library copied in <code>libs</code> folder. External library path is:</p>
  
  <pre><code>my_project/libs/sk/aicit/leg/libraries*.class
  </code></pre>
  
  <p>I have added <code>./libs</code> folder in <strong>Libraries</strong> settings of project.
  I <strong>do not</strong> have <code>.jar</code> version of this library, only <code>.class</code> files.</p>
  
  <p>I have also souce code of this library, but I didnt want to include its classes in my project, it has its own dependencies, I wanted to just "link" it like library. Its an external library I havent written. </p>
  
  <hr>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>I have copied all the source files from library to my projects "src/" dir. I have removed Library from Java build path. I can stil compile my project, but when I run it Iget</p>
  
  <pre><code>FATAL EXCEPTION:main
  java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{
  com.example/myvideorecord/com.example.myvideorecord.Robot}: java.langNullPointerException
  ...
  </code></pre>
  
  <p>What can I do, how to debug this error? :(</p>