I have created an Android project and added an external JAR (hessian-4.0.1.jar) to my project. I then added the JAR to the build path and checked it off in Order and Export.
If you are using gradle build system, follow these steps:
put jar
files inside respective libs
folder of your android app. You will generally find it at Project
> app
> libs
. If libs
folder is missing, create one.
add this to your build.gradle
file your app
. (Not to your Project
's build.gradle
)
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
// other dependencies
}
This will include all your jar
files available in libs
folder.
If don't want to include all jar
files, then you can add it individually.
compile fileTree(dir: 'libs', include: 'file.jar')