Maven 搜索Gradle插件的方法

Maven 搜索Gradle插件的方法,maven,android-studio,gradle,android-gradle-plugin,jcenter,Maven,Android Studio,Gradle,Android Gradle Plugin,Jcenter,我正在尝试将现有项目从Eclipse转换为Android Studio 我希望尽可能多地放置从jcenter或mavenCentral存储库中提取的Gradle插件 我有点困惑,如何寻找这些 我发现的三个网站都没有令人满意的结果 三者中最好的似乎是MVN 这三个人都没有返回Microsoft Live SDK的结果。假设不存在用于此的插件,而我必须将其作为一个项目包含,这是否正确 我的依赖性是通过导入Studio生成的-除了我更改的Facebook dependencies { compile

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

我希望尽可能多地放置从jcenter或mavenCentral存储库中提取的Gradle插件

我有点困惑,如何寻找这些 我发现的三个网站都没有令人满意的结果

三者中最好的似乎是MVN

这三个人都没有返回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')
}

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

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项目,您也应该导入它。
我希望这会有帮助。

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


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

我知道依赖项的含义。我想问的是如何将JAR转换为存储库,我不知道你的意思是什么。如果您实际上在本地有一个来自liveSDK的jar,那么您可以使用flatDir repo。谢谢,我希望能有一个更灵活的搜索,比如只需键入facebooksdk,然后找到没有完整软件包名称的正确软件包。是的,你不需要输入完整的软件包名称。如果你在maven central中键入“Facebook”,它会给你几个选项。但是最终你确实需要知道完整的软件包名称来选择你想要的lib。这并不完全正确,如果你键入Facebook,你会得到一个很长的列表,你可以通过它来扫描找到相关的软件包。如果最有可能或最受欢迎的软件包位于顶部,这将非常有用。我觉得搜索效率不高。如果你有一个或两个软件包是可以的,但是如果你有更多的软件包,你就开始浪费时间了,啊,我明白了。是的,这是相对低效的,虽然希望你只需要经历一次。