Import Eclipse library (non-gradle) project to Android Studio

     Sometimes, we have a non-gradle project and want to use it in Android Studio as a library project. In cannot be imported by adding dependencies in build.gradle as usual way. In this tip, I will present a simple way to import them, make reference with our own project.
    For example, importing SlidingMenu project from Github.

    Step 1: Download  and extract it.
    Step 2: After extracting, put "library" folder from "SlidingMenu-master" folder to your "libs" folder of project:

    Step 3: Go to File --> New --> Import Module, and add the library project as a module in Android Studio:

    Step 4: Add the library project (module) in build path: go to File --> Project Structure...On the left pane click on app, choose Dependencies tab, click green + button and select Module dependencies:
    Now select the library project you already added. After that, Android Studio will auto-sync gradle for your project and you can start coding from now!
Hope this help! :D

Share


Previous post
« Prev Post
Next post
Next Post »