加入Twitter的工具包andoid工作室项目 [英] Adding twitter-kit to andoid studio project
问题描述
我想补充能够与Twitter要我的应用程序登录。 我下面本的手册中为了做到这一点。 当我试图加入到依赖这些行后同步的摇篮:
I am trying to add enable logging in with twitter to my application. I am following this manual in order to do so. When I'm trying to sync the gradle after adding to the dependencies these lines:
compile('com.twitter.sdk.android:twitter:1.3.2@aar') {
transitive = true;
}
(因为他们在自己的网站上指示) 我收到这个摇篮错误:
(as they instruct in their website) I recieve this gradle error:
无法解析:com.twitter.sdk.android:twitter:1.3.2
Failed to resolve: com.twitter.sdk.android:twitter:1.3.2
我该如何解决这个问题? 非常感谢, 尤瓦。
How can I fix this issue? Thank you very much, Yuval.
推荐答案
您需要在您build.gradle的顶部添加面料 - 你可能已经有应用插件:com.android.application行,只是把所有这些东西在它的地方。
You need to add Fabric at the top of your build.gradle - you probably already have the apply plugin: 'com.android.application' line, just put all of this stuff in its place.
buildscript {
repositories {
maven { url 'https://maven.fabric.io/repo' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/repo' }
}
但是,这仅仅是一个障碍 - 接下来你将不得不进行身份验证以面料本身。基本上,你开始在错误的地方 - 的Twitter希望你首先要 https://get.fabric.io/ 和整合面料到您的工作流程。
But this is just one hurdle - next you're going to have to authenticate to Fabric itself. Basically, you started in the wrong place - Twitter wants you to start by going to https://get.fabric.io/ and integrating Fabric into your workflow.
这篇关于加入Twitter的工具包andoid工作室项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!