为什么Facebook的SDK将不会导入 [英] Why the facebook sdk is not imported

查看:145
本文介绍了为什么Facebook的SDK将不会导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近下载了最新的Facebook SDK。进口的步骤是:

I recently downloaded the latest facebook sdk. The step of import is:


  1. 进口的Facebook SDK

  2. 构建了SDK,在BUN / res文件夹有一个facebooksdk.jar〜450KB

  3. 罐子复制到桌面

  4. 在我的项目中,右键单击属性,在lib中添加外部JAR,并选择其包括在构建路径

问题是implemnt后登录类这样的:

The problem is after implemnt the login class like the following:

<com.facebook.widget.LoginButton
    android:id="@+id/authButton"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:layout_marginTop="30dp" />

它不能找到类com.facebook.widget.LoginButton,如何解决它,如果我想使facebooksdk的罐子?谢谢

it can not find the class com.facebook.widget.LoginButton , how to fix it if I would like to make the facebooksdk as jar ? Thanks

推荐答案

在Facebook的SDK并不意味着添加为一个罐子,你添加它作为您的项目中一个单独的模块,并依赖于它。此链接到SDK文档(Eclipse中): https://developers.facebook.com/docs /安卓/获取启动的以及此链接(Android的一室公寓):<一href=\"https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android-using-android-studio/3.0/\" rel=\"nofollow\">https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android-using-android-studio/3.0/做解释如何启动和运行一个非常神的工作。如果你跟随他们,你不应该有问题。

The Facebook SDK is not meant to be added as a jar, you add it as a separate module in your project and depend on it. This link to the SDK Docs (Eclipse): https://developers.facebook.com/docs/android/getting-started and this link (Android Studio): https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android-using-android-studio/3.0/ do a very god job of explaining how to get up and running. If you follow them you should have no problems.

我不知道你的发髻/ res目录是什么,但我没有任何需要单独建立了SDK,仅仅依靠您在项目设置/属性创建库模块

I don't know what your bun/res directory is but I didn't have any need to build the sdk separately, just depend on the library module you create in your project setting/properties

这篇关于为什么Facebook的SDK将不会导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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