如何将gradle库依赖项添加到codenameone项目中
问题描述:
通常在android中我可以编辑build.gradle文件并将我的编译依赖项放置如下:
Normally in android I can just edit the build.gradle file and place my compile dependencies like this:
dependencies {
compile 'com.android.support:support-v4:23.+'
compile 'com.google.android.gms:play-services-plus:8.3.0'
compile 'com.google.android.gms:play-services-auth:8.3.0'
compile 'com.google.android.gms:play-services-base:8.3.0'
}
如何在codenameone项目中添加编译依赖项?
How can I add a compile dependency in a codenameone project?
答
生成的项目使用jcenter()存储库。
为了添加编译依赖项,您需要使用'gradleDependencies'构建提示,例如:
The generated project utilizes the jcenter() repository. In order to add a compile dependency you will need to use the 'gradleDependencies' build hint, for example:
gradleDependencies=" compile 'com.facebook.android:facebook-android-sdk:4.7.0'\n"