Eclipse Access Facebook Login SDK

Source: Internet
Author: User

FB's login SDK is made based on as (Android Studio). AAR Package

Everyone uses the. jar Package SDK on the Eclipse platform

The difference between the two ways to connect the SDK is large

I'm here to talk about using eclipse to pick up Facebook's login package

Download to SDK to get Facebook-android-sdk-4.26.0.aar This package, we also only use this package


First step: Change the Aar file suffix name to zip and unzip
Step two: Create a Libs folder in the extracted directory, and then classes.jar move all files and jni folders under the Libs folder
Step three: Copy the contents of the proguard.txt file into the file of your project proguard-project.txt
Fourth step: Create the file in the extracted directory project.properties , the content is as follows:

Target=android-22android.library=true

Fifth step: Delete aapt and jni folders as well as R.txt and proguard.txt files

Now that an Eclipse library project has been built, just open the Eclipse Import project and configure the project to reference it in your project.


1 to 5 steps provided by planktonic prawns

Links: http://www.jianshu.com/p/ccf306e08d5b


That's not enough. You're not compiling!!!

Need to be modified as follows:

1.

If there is an error in the Androidmanifest.xml file

<provider android:name= "Com.facebook.internal.FacebookInitProvider" android:authorities= "${applic Ationid}. Facebookinitprovider "android:exported=" false "/>

This can be erased!


2.

If there is an error in the Facebook-android-sdk-4.26.0.aar\res\values\values.xml file

    <style name= "Com_facebook_activity_theme"  parent= "@style/ Theme.AppCompat.NoActionBar ">        <item name=" Android: Windowistranslucent ">true</item>        <item name=" Android:windowbackground "> @android:color/transparent</item>         <item name= "Android:windownotitle" >true</item>    </style>     <style name= "Com_facebook_auth_dialog"  parent= "@style/ Theme.AppCompat.Dialog ">        <item name=" Android: Windowistranslucent ">true</item>        <item name=" Android:windowbackground "> @android:color/transparent</item>         <item name= "Android:windownotitle" >true</item>        <item name= "Android:windowIsFloating" > True</item>    </style>


@style/theme.appcompat.noactionbar@style/theme.appcompat.dialog Both can be used @android: Style/theme.notitlebar instead


3.

If Facebook-android-sdk-4.26.0.aar\res\layout\com_facebook_device_auth_dialog_fragment.xml

and com_facebook_smart_device_dialog_fragment.xml This file, these two are similar

There's an error in both files.

<android.support.v7.widget.cardview xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:app= " Http://schemas.android.com/apk/res-auto "android:layout_width=" wrap_content "android:layout_height=" wrap_content "App:cardbackgroundcolor=" @android: Color/transparent "app:cardelevation=" 10DP ">


This sentence

Xmlns:app= "need to be modified to xmlns:app=" Note COM.HYTC.ZJSG is the package name of my game, which is your game project's Androidmanifest.xml file's property value <?xml version = "1.0" encoding= "Utf-8"? ><manifest xmlns:android= "Http://schemas.android.com/apk/res/android" package= " COM.HYTC.ZJSG "


4. Not yet, if the following sentence error

Loginmanager.getinstance (). Loginwithreadpermissions (App_instance, Arrays.aslist ("Public_profile", "User_friends" ));

Need to add Android-support-v4.jar this jar package into the Libs of your project

Android-support-v4.jar This package in adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v4 This directory, this is the Google SDK Ah! !



The Facebook-android-sdk-4.26.0.aar package has been uploaded!

This article is from the "Key Window" blog, be sure to keep this source http://kome2000.blog.51cto.com/969562/1971741

Eclipse Access Facebook Login SDK

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.