{"id":659,"date":"2016-05-01T10:44:07","date_gmt":"2016-05-01T10:44:07","guid":{"rendered":"http:\/\/abhiandroid.com\/androidstudio\/?p=659"},"modified":"2016-05-01T10:44:07","modified_gmt":"2016-05-01T10:44:07","slug":"import-add-external-jar-files-android-studio","status":"publish","type":"post","link":"https:\/\/abhiandroid.com\/androidstudio\/import-add-external-jar-files-android-studio.html","title":{"rendered":"How To Import Or Add External JAR Files In Android Studio"},"content":{"rendered":"<p>Basically, JAR is a Java Archives Package file, which comprises several Java files to achieve a specific task. The meta data and Resources(text,images etc.) are also comprised with in a file to distribute it as Library files.<\/p>\n<p style=\"text-align: left;\">All JAR files are archived file which are built on Zip format. JAR files have the .JAR extension. You can add these JAR files to your libs folder under app folder to provide your project some additional functionality.<\/p>\n<p style=\"text-align: left;\">Lets see the steps involve in importing or adding a JAR file in Android Studio:<\/p>\n<hr \/>\n<h4 style=\"text-align: left;\"><strong>How to import or Add External JAR files in Android Studio:<\/strong><\/h4>\n<p style=\"text-align: left;\"><strong>Step 1:<\/strong> Download any JAR file for your Project. For Example: Download three Mail dependency JAR files for Android Studio. <a href=\"https:\/\/code.google.com\/archive\/p\/javamail-android\/downloads\" target=\"_blank\" rel=\"nofollow\">Get it from Here<\/a><\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-675\" src=\"http:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/Download-Jar-Files-Android-Studio.jpg\" alt=\"Download Jar Files Android Studio\" width=\"556\" height=\"214\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/Download-Jar-Files-Android-Studio.jpg 556w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/Download-Jar-Files-Android-Studio-300x115.jpg 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/p>\n<p style=\"text-align: left;\"><strong>Step 2:<\/strong> Download all the three JAR files in somewhere in your system.<\/p>\n<p style=\"text-align: left;\"><strong>Step 3:<\/strong> Copy these three Files from that folder where you downloaded them, and Paste it in libs folder under app folder of your project.<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-676\" src=\"http:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/Paste-jar-files-in-Libs-folder-Android-Studio.jpg\" alt=\"Paste jar files in Libs folder Android Studio\" width=\"352\" height=\"335\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/Paste-jar-files-in-Libs-folder-Android-Studio.jpg 352w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/Paste-jar-files-in-Libs-folder-Android-Studio-300x286.jpg 300w\" sizes=\"auto, (max-width: 352px) 100vw, 352px\" \/><\/p>\n<p style=\"text-align: left;\"><span style=\"color: #ff0000;\"><strong>Important Note:<\/strong><\/span> If you are not able to find libs then you must be viewing your project in &#8220;Android&#8221; view. On the right side of Android tab you will see &lt; &gt; symbol. Click on it and select Project. This option is available in Android Studio 2.1.<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-677\" src=\"http:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/Android-Vs-Project-View-Android-Studio.jpg\" alt=\"Android Vs Project View Android Studio\" width=\"700\" height=\"335\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/Android-Vs-Project-View-Android-Studio.jpg 700w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/Android-Vs-Project-View-Android-Studio-300x144.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p style=\"text-align: left;\">If you are using any older version where you can&#8217;t find this, then you simply need to click on Android tab and it will show you a drop down list from that list select project.<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-679\" src=\"http:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/libs-in-Android-Studio.jpg\" alt=\"libs in Android Studio\" width=\"699\" height=\"278\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/libs-in-Android-Studio.jpg 699w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/libs-in-Android-Studio-300x119.jpg 300w\" sizes=\"auto, (max-width: 699px) 100vw, 699px\" \/><\/p>\n<p style=\"text-align: left;\"><strong>Step 5:<\/strong> Now paste jar files here in libs folder<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-680\" src=\"http:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/paste-jar-files-in-libs.jpg\" alt=\"paste jar files in libs\" width=\"463\" height=\"455\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/paste-jar-files-in-libs.jpg 463w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/paste-jar-files-in-libs-300x295.jpg 300w\" sizes=\"auto, (max-width: 463px) 100vw, 463px\" \/><\/p>\n<p style=\"text-align: left;\"><strong>Step 4:<\/strong> Once your JAR files are successfully copied to libs folder and we will add them as dependency files.<\/p>\n<p style=\"text-align: left;\"><strong>Step 5:<\/strong> Click on <strong>File &gt; Project Structure &gt;Select app &gt;\u00a0Dependencies<\/strong> Tab.<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-681\" src=\"http:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/dependencies-in-Android-Studio.jpg\" alt=\"dependencies in Android Studio\" width=\"734\" height=\"202\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/dependencies-in-Android-Studio.jpg 734w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/dependencies-in-Android-Studio-300x83.jpg 300w\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" \/><\/p>\n<p style=\"text-align: left;\"><strong>Step 6:<\/strong> Click on (+) plus button given on right side and select File Dependency.<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-682\" src=\"http:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/file-dependency-in-Android-Studio.jpg\" alt=\"file dependency in Android Studio\" width=\"563\" height=\"215\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/file-dependency-in-Android-Studio.jpg 563w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/file-dependency-in-Android-Studio-300x115.jpg 300w\" sizes=\"auto, (max-width: 563px) 100vw, 563px\" \/><\/p>\n<p style=\"text-align: left;\"><strong>Step 7:<\/strong> This will pop up a dialog box for selecting path. Under this open <strong>libs<\/strong> folder and add\u00a0your Jar files one by one.<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-684\" src=\"http:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/add-jar-files-one-by-one-in-dependency.jpg\" alt=\"add jar files one by one in dependency\" width=\"371\" height=\"395\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/add-jar-files-one-by-one-in-dependency.jpg 371w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/add-jar-files-one-by-one-in-dependency-282x300.jpg 282w\" sizes=\"auto, (max-width: 371px) 100vw, 371px\" \/><\/p>\n<p style=\"text-align: left;\"><strong>Steps 8:<\/strong> Once you select all three Jar files then click Ok button and your Gradle will Start building.<\/p>\n<p style=\"text-align: left;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-683\" src=\"http:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/select-jar-files-and-click-ok-android-studio.jpg\" alt=\"select jar files and click ok android studio\" width=\"354\" height=\"332\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/select-jar-files-and-click-ok-android-studio.jpg 354w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/select-jar-files-and-click-ok-android-studio-300x281.jpg 300w\" sizes=\"auto, (max-width: 354px) 100vw, 354px\" \/><\/p>\n<p style=\"text-align: left;\">This way you need to manually add any thing in build.gradle file. After completion of gradle building everything will be done and you are ready to use your External JAR Library.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Basically, JAR is a Java Archives Package file, which comprises several Java files to achieve a specific task. The meta data and Resources(text,images etc.) are also comprised with in a file to distribute it as Library files. All JAR files are archived file which are built on Zip format. JAR files have the .JAR extension. &hellip; <a href=\"https:\/\/abhiandroid.com\/androidstudio\/import-add-external-jar-files-android-studio.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How To Import Or Add External JAR Files In Android Studio<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,62],"tags":[],"class_list":["post-659","post","type-post","status-publish","format-standard","hentry","category-archieve","category-tips"],"psp_head":"<title>How To Import Or Add External JAR Files In Android Studio \u2013 Abhi Android<\/title>\r\n<meta name=\"description\" content=\"Lets see the steps involve in importing or adding a JAR file in Android Studio. Basically, JAR is a Java Archives Package file, which comprises several Java files to achieve a specific task.\" \/>\r\n<meta name=\"robots\" content=\"index,follow\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/abhiandroid.com\/androidstudio\/import-add-external-jar-files-android-studio.html\" \/>\r\n","_links":{"self":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts\/659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/comments?post=659"}],"version-history":[{"count":0,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts\/659\/revisions"}],"wp:attachment":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/media?parent=659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/categories?post=659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/tags?post=659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}