如何"库"建立和维持一个gradle这个Android项目?
我目前没有使用库文件夹中我第三方依赖(看来他们会自动添加到建立/中间体/ pre-dexed /),但注意到,它可以帮助静态code分析,所以我想将它添加到项目中。
注意:我使用Maven依赖
I currently am not using the "libs" folder for my third party dependencies (it seems they are added automatically to build/intermediates/pre-dexed/) but noticed that it may help static code analysis so I would like to add it to the project. Note: I'm using maven dependencies.
我的问题:使用自定义脚本来生成这个文件夹的人吗?我几乎认为,当有可用的更新版本中生成一次,然后手动维护。
My question: Are people using custom scripts to generate this folder? I hardly think that this is generated once and then manually maintained when there is a newer version available.
请赐教!
使用Android的Studio和摇篮,有不需要以使用libs文件夹中(除旧的.jar库)。
With Android Studio AND Gradle, there is no need to use libs folder (except for old .jar library).
事实上,你可以开发Android应用的Android whitout工作室在您的build.gradle已经有一个应用插件:'com.android.application
In fact you can develop Android app whitout Android Studio as in your build.gradle there is already a apply plugin: 'com.android.application'
Gralde通过依赖的gradle使用Maven或jCenter导入库。摇篮和Android摇篮插件会的全自动下载如您在构建/文件夹的赛义德库。它不是静态的,干净的清洁谟
Android上的工作室。此外,当一个新版本的库是在你的build.gradle提供全自动的Android Studio将添加一个警告。
Gralde is using Maven or jCenter via gradle dependencies to import libraries. Gradle and Android Gradle plugin will automaticly download the libs as you sayed in a build/ folder. It is not static and can be clean with the Clean projet
on Android Studio. Also, Android Studio will add a warning when a new library version is available automaticly in your build.gradle.
不要错过老库
文件夹用于导入的.jar库
Dont miss the old libs
folder used to import .jar library