How can I add a JAR in my gradle project?

前端 未结 2 434
终归单人心
终归单人心 2020-12-09 19:57

I am using gradle in Android studio for an android project. I have a jar that I downloaded called TestFlightAppLib.jar. This jar isn\'t present in the maven rep

相关标签:
2条回答
  • 2020-12-09 20:14

    just add

    compile fileTree(dir: 'libs', include: '*.jar')
    

    to your dependencies in the build.gradle then all the jars in the libs folder will be included.

    0 讨论(0)
  • 2020-12-09 20:30

    Put the jar in a folder called libs (created on the root of your project). Once moved right click on the jar and you will find "add as library". Click on it and select the module!

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