将 twitter-kit 添加到 android studio 项目 [英] Adding twitter-kit to android studio project

查看:33
本文介绍了将 twitter-kit 添加到 android studio 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的应用程序添加启用 Twitter 登录功能.我正在关注 this 手册以便这样做.当我在添加到依赖项后尝试同步 gradle 时:

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

(按照他们在网站上的说明)我收到此 gradle 错误:

(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?

推荐答案

您需要在 build.gradle 的顶部添加 Fabric - 您可能已经有了 apply plugin: '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' }
}

但这只是一个障碍 - 接下来您必须对 Fabric 本身进行身份验证.基本上,你从错误的地方开始 - Twitter 希望你从 https://get.fabric.io/ 和集成开始Fabric 进入您的工作流程.

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-kit 添加到 android studio 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆