Android Studio 导入 facebook 库 奥德赛 [英] Android Studio import facebook library odyssey
问题描述
我正在尝试在我的应用程序中使用 Facebook 登录和 Android Studio 中的 Facebook 库.
I am trying to use Facebook login in my App with the Facebook library in Android Studio.
在完成关于如何在 Android Studio 0.6.1 上导入该库的 9 个教程之后,在点击清理项目之前一切顺利(在上一个教程中),点击它后我收到此错误:
After following 9 tutorials about how to import that library on Android Studio 0.6.1 , all was going well (on the last tutorial) before click on clean project, after click on it I am getting this error:
*C:\Users\Demetria\AndroidStudioProjects\Test\libreries\facebook\src\com\facebook\FacebookA ppLinkResolver.java
Error:(21, 13) error: package bolts does not exist
Error:(37, 49) error: cannot find symbol class AppLinkResolver
Error:(57, 12) error: cannot find symbol class Task
Error:(63, 42) error: cannot find symbol class Continuation
Error:(105, 83) error: cannot find symbol variable Task
Error:(192, 27) error: package AppLink does not exist*
有人可以帮我吗?.
提前致谢.
Could anyone help me please?.
Thanks in advance.
推荐答案
如果您通过 File > 导入库导入模块
,Android Studio 将该 facebook
目录复制到您的项目中.$PROJECT_ROOT/facebook/build.gradle
文件引用了 bolts.jar
:
If you imported the library via File > Import Module
, Android Studio copied that facebook
directory into your project. The $PROJECT_ROOT/facebook/build.gradle
file references bolts.jar
:
dependencies {
compile files('../libs/bolts.jar')
compile 'com.android.support:support-v4:19.+'
}
请注意,在来自 Facebook 的解压缩存档中,库的父文件夹(..
路径)中有一个 libs
文件夹.在您的项目中,您需要指向 libs
文件夹在 facebook 库文件夹中.将 ..
改为 .
如下:
Note that in the unziped archive from Facebook, there is a libs
folder in the parent folder (the ..
path) of the library. In your project, you need to point at the libs
folder in the facebook library folder. Change ..
to .
as below:
dependencies {
compile files('./libs/bolts.jar')
compile 'com.android.support:support-v4:19.+'
}
这篇关于Android Studio 导入 facebook 库 奥德赛的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!