sitelink1 | https://stackoverflow.com/questions/2070...radle-file |
---|---|
sitelink2 | |
sitelink3 |
ⓠ Question > How to add local .jar file dependency to build.gradle file?
ⓐ Answer > According to the documentation
Groovy syntax:
dependencies {
implementation files('libs/a.jar', 'libs/b.jar')
implementation fileTree('libs') { include '*.jar' }
}
Kotlin syntax:
dependencies {
implementation(files("libs/a.jar", "libs/b.jar"))
implementation(fileTree("libs") { include("*.jar") })
}
의존성을 추가했다면 Refresh Gradle 을 통해 프로젝트의 의존 라이브러리들을 갱신해야만 한다.