How to add gradle library dependency to a codenameone project

旧街凉风 提交于 2020-01-01 17:12:34

问题


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'
 } 

How can I add a compile dependency in a codenameone project?


回答1:


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"


来源:https://stackoverflow.com/questions/35549182/how-to-add-gradle-library-dependency-to-a-codenameone-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!