background preloader

Android Studio

Facebook Twitter

Importing libraries into Android Studio | Crowbar Solutions. Not all Android libraries out there provide a Maven dependency to include it into your project. Sometimes you will just have to resort to the original method of just including the source code in your project. For this example, I will be importing the SlidingMenu library for Android by Jeremy Feinstein. First of all, allow me to illustrate the folder structure of your entire project: To achieve this structure, you will have to create library folder in the root of your project, and import the code library you want to include into it as a module. Note that if the code library you are trying to import doesn’t already have a build.gradle file, you may need to import it into Eclipse first and generate the necessary build.gradle file (as of writing this post, Android Studio is unable to generate build.gradle files for eclipse projects).

Next, based on the naming conventions I established in the image above ensure you have the following: In your APP’s build.gradle file make sure you have: