从 github上面下载的代码,比如ui控件,是不是要把 这个项目 打包jar .然后 放到自己项目的libs才能用?
黄舟2017-04-17 14:40:22
How Gradle uses other people’s projects. . The words go in two directions. .
Publishing projects in Maven or jcenter is very simple, just add it directly to build.gradle in the app directory, like below
dependencies {
...
compile 'com.squareup.retrofit:retrofit:1.9.0'
...
}
Here I am using version 1.9.0 of retrofit.
Add an Android Studio project and call its libraries. In fact, it is very simple. Copy the entire project and a name will be generated in Android Studio, such as your_project
It’s ok to write like this at this time
dependencies {
...
compile project(':your_project')
...
}