How to add a jar in External Libraries in android studio

前端 未结 14 2046
北海茫月
北海茫月 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:52

    Add your jar file to the folder app/libs. Then right click the jar file and click "add as library".

    If there is no libs folder you can create it. Click on the combo box that says "Android", and change it to "Project"

    From here, you can right click on "apps" in the directory tree and go to "New" => "Directory"

    0 讨论(0)
  • 2020-11-22 16:52

    In android Studio version 3.0 or more I have used bellow like :

    1. Create libs to the app directory if not exist folder like
    • Go to project
    • Go to app
    • click on apps->New->Directory
    • named the folder libs
    • paste the jar to the libs folder
    • directory will be look like bellow image

    1. In build.gradle add bellow lines

      implementation fileTree(dir: 'libs', include: ['*.jar']) implementation files('libs/com.ibm.icu_3.4.4.1.jar')

    0 讨论(0)
提交回复
热议问题