Sebastian
Sebastian

Reputation: 569

how to import own jar into android project (ADT 20)

If I import a selfmade jar file into my Android project (add it to the libs folder) I get an "Could not find class" error sent by dalvikvm. (I'm using Eclipse)

Obviously it's not an import error, because downloaded jars (like jdome) worke fine.

So I guess it's an export error. The way how I export a jar is: right click on project -> export -> jar -> leave default settings -> finish

I'm sure it's no internal problem, because the jar contains only one class which has only one method for test reasons.

Does anyone know what I did wrong?????

Upvotes: 0

Views: 659

Answers (2)

Rajendra
Rajendra

Reputation: 1698

Just copy and paste your .jar file in libs folder of your project.

Upvotes: 1

Rishabh Agrawal
Rishabh Agrawal

Reputation: 901

Yry this, I hope this will work for you:

  • Go To Your Project
  • Right Click
  • Properties
  • Java Build Path
  • Libraries
  • Add External Jar
  • Select Jar File
  • OK

Upvotes: 0

Related Questions