为 Android Studio 0.3.1 导入 Facebook SDK [英] Import Facebook SDK for Android Studio 0.3.1
问题描述
0.3.1 中的项目结构对话框已完全改变 - 我不知道如何使用新结构导入 Facebook SDK.Facebook 的导入说明尚未更新.如果有人可以提供帮助,我们将不胜感激.
The Project Structure dialog in 0.3.1 has changed completely - I cannot figure out how to import the Facebook SDK using the new structure. Facebook's import instructions has not been updated. If anyone coul provide assistance please that would be much appreciated.
更新:应用@plastiv 建议后的错误截图
Update: Screenshot of errors after applying @plastiv's suggestion
推荐答案
Edit next file and re-sync project (Sync project with gradle files button or restart idea).
Edit next file and re-sync project (Sync project with gradle files button or restart idea).
MyProject\MyApp\build.gradle
repositories {
mavenCentral()
maven {
url 'https://github.com/Goddchen/mvn-repo/raw/master/'
}
}
dependencies {
compile 'com.facebook.android:facebook:3.5.2'
}
正如您所看到的,这不是官方的@aar 库包,在 Facebook 将其 SDK 上传到 mavenCentral 之前,我们可以使用来自社区的这个临时解决方案.
As you can see this is not official @aar library bundle, until Facebook uploads its SDK to mavenCentral we can use this temp solution from the community.
这篇关于为 Android Studio 0.3.1 导入 Facebook SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!