Reputation: 3595
I'm new to android and java. I downloaded the GSON library for use in my android project which exists in Eclipse. I lookup instructions on how to use the jar file in my project and it says... Quote... You can use a third party JAR in your application by adding it to your Eclipse project as follows:
In the Package Explorer panel, right-click on your project and select Properties.
Select Java Build Path, then the tab Libraries.
Press the Add External JARs... button and select the JAR file.
Alternatively, if you want to include third party JARs with your package, create a new directory for them within your project and select Add Library... instead.
It is not necessary to put external JARs in the assets folder ...UnQuote
I'm afraid that I don't know the difference between "using a 3rd party jar in my project" and "include third party jars with my package." I want to be able to use the GSON methods in my Android phone application and, of course, have the capability deployed in my .apk.
So, Which do I want to do? Thanks, Gary
Upvotes: 5
Views: 13015
Reputation: 1
Right click onto your main project in the Project Explorer
Open properties option, found at the bottom of the context menu
A dialog box opens from which you select the Android option
Remove the old .jar
file, click on ADD to add a new .jar
file and select your the file you want to add
You're done!
Upvotes: 0
Reputation:
click Properties
left select Build path
Than add jar, and do not use the external libs, unless it is really required.
You have to copy the jar to your project to find it with "Add jars"
Upvotes: 4
Reputation: 1830
add the jar to your libs folder in your project.
open eclipse go to package explorer
right click on your project and select project properties
click on java Build path in the bar on the left hand side of the popup
select the libraries tab
select the "Add External Jar File" and navigate to your JAR file
best of luck =)
Upvotes: 6