搜索Gradle插件的方法

时间:2015-03-26 07:31:43

标签: maven android-studio gradle android-gradle jcenter

我正在尝试将现有项目从Eclipse转换为Android Studio

我想尽可能多地放置依赖项,因为Gradle Plugins是从jcenter()或mavenCentral()存储库中提取的

我有点困惑如何搜索这些 我发现的三个网站都没有返回令人满意的结果

http://plugins.gradle.org

http://mvnrepository.com

https://bintray.com

三者中最好的似乎是mvnrepository

三者都没有返回Microsoft Live SDK的结果。假设不存在插件并且我必须将其作为项目包含在内是否正确?

导入Studio后产生的依赖性 - 除了我更改的Facebook

dependencies {
compile 'com.facebook.android:facebook-android-sdk:3.23.1'
compile project(':liveSdk')
compile 'com.google.http-client:google-http-client-gson:1.19.0'
compile 'com.google.code.gson:gson:2.1'
compile 'com.android.support:mediarouter-v7:18.0.0'
compile 'com.android.support:appcompat-v7:18.0.0'
compile 'com.google.android.gms:play-services:+'
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile files('libs/dropbox-android-sdk-1.5.4.jar')
compile files('libs/google-api-client-1.18.0-rc.jar')
compile files('libs/google-api-client-android-1.18.0-rc.jar')
compile files('libs/google-api-services-drive-v2-rev119-1.18.0-rc.jar')
compile files('libs/google-http-client-1.18.0-rc.jar')
compile files('libs/google-http-client-android-1.18.0-rc.jar')
compile files('libs/google-oauth-client-1.18.0-rc.jar')
compile files('libs/jackson-annotations-2.2.2.jar')
compile files('libs/jackson-core-2.2.2.jar')
compile files('libs/jackson-databind-2.2.2.jar')
compile files('libs/json_simple-1.1.jar')
}

2 个答案:

答案 0 :(得分:0)

此库将从远程存储库中解析:

compile 'com.facebook.android:facebook-android-sdk:3.23.1'
compile 'com.google.http-client:google-http-client-gson:1.19.0'
compile 'com.google.code.gson:gson:2.1'
compile 'com.android.support:mediarouter-v7:18.0.0'
compile 'com.android.support:appcompat-v7:18.0.0'
compile 'com.google.android.gms:play-services:+'

这是您工作区中的一个项目:

compile project(':liveSdk')

这是libs文件夹中的文件:

compile files('libs/YouTubeAndroidPlayerApi.jar')
compile files('libs/dropbox-android-sdk-1.5.4.jar')
compile files('libs/google-api-client-1.18.0-rc.jar')
compile files('libs/google-api-client-android-1.18.0-rc.jar')
compile files('libs/google-api-services-drive-v2-rev119-1.18.0-rc.jar')
compile files('libs/google-http-client-1.18.0-rc.jar')
compile files('libs/google-http-client-android-1.18.0-rc.jar')
compile files('libs/google-oauth-client-1.18.0-rc.jar')
compile files('libs/jackson-annotations-2.2.2.jar')
compile files('libs/jackson-core-2.2.2.jar')
compile files('libs/jackson-databind-2.2.2.jar')
compile files('libs/json_simple-1.1.jar')

因此,如果你的Eclipse中有一个liveSDK项目,你也应该导入它。 我希望它有所帮助。

答案 1 :(得分:0)

我通常会去Maven Central寻找已发布的gradle库:

http://search.maven.org/

只需输入jar的名称,您很可能会看到已发布的gradle库。