Reputation: 4104
I'm Visual Studios / C#, you can simply add a reference to a DLL file and then just use that namespace. I'm starting to dig into Android development and want to use the SimpleFTP library. Downloaded the .jar file, went to File --> Import and now I've got SimpleFTP.class and SimpleFTP.java in org\jibble\simpleftp in my Package Explorer.
But if I try to import org.jibble.simpleftp;
it says it cannot be resolved. What have I done wrong?
I was hoping I could just start typing as if I had properly imported the library and it'd figure out how to correct my package, but no such luck =[
Upvotes: 0
Views: 362
Reputation: 83587
There are at least three solutions:
If you have the source code, you can place it under your src
folder directly in your project.
If you have the source code, you can create an Android Library Project with the source code and connect your Android app projec to the library project.
If you have a JAR file, you can place it in the libs
folder of your proejct.
Upvotes: 2
Reputation: 13761
Project -> Properties -> Java Path -> Libraries. There you can add your existing libraries, in several formats (jar, .zip, etc.).
Upvotes: 0