How to add a jar in External Libraries in android studio

前端 未结 14 2077
北海茫月
北海茫月 2020-11-22 16:17

I am new to Android Studio. What I need to do is add a few jar files in the External Libraries below the < JDK > folder.

14条回答
  •  死守一世寂寞
    2020-11-22 16:42

    A late answer, although I thought of giving an in-depth answer to this question. This method is suitable for Android Studio 1.0.0 and above.


    STEPS


    1. First switch your folder structure from Android to Project.

    1. Now search for the libs folder inside app - build folder.

    1. Once you have pasted the .jar file inside libs folder. Right click on the jar file and at end click on Add as library. This will take care of adding compile files('libs/library_name.jar') in build.gradle [You don't have to manually enter this in your build file].

    Now you can start using the library in your project.

提交回复
热议问题