Could not find FacebookSDK - android

im just trying to intall facebook sdk to my phonegap android project.i followed
https://github.com/phonegap/phonegap-facebook-plugin
and after intalling fbsdk I have added it under Project
properties->Android->Library
section and select the facebooksdk library Im seeing green color tick mark infront of the added library. but when i opened Project again
properties->Android window
the green tick mark is not displaying under Library section,
instead I'm seeing red cross mark..i have added external jar files also but
cant find out the solutoin.is there any solutions for this ?

Following are the steps to include Facebook SDK into android project:
1) Download the Facebook SDK from the https://github.com/facebook/facebook-android-sdk/ and extract it to local drive.
2) Import "facebook" as a android project into your Eclipse, this is your Facebook SDK, and You have to reference it to your android project.
3) Now create your android project.
4) Right click on it, go to Properties-->android and Add the "facebook "Library as a reference to your project. click Apply.
Check the video link: http://www.youtube.com/watch?v=w-vNi1W4fco

Related

Facebook SDK 4.8.2 import in ECLIPSE

How to import facebook sdk 4.8.2 in eclipse. I am unable to import as facebook folder contains aar file when we directly download developer site. And from git , unable to get src files of facebook
Here you have an answer from Android Facebook SDK 4 in Eclipse
I also have faced this problem, so I will write a short guide, how to
install it in Eclipse.
Step 1. Import to Eclipse First of all, download the latest
version of SDK (on current moment it is 4.0). Unzip it to a
folder.
Open Eclipse, click the right mouse button in "PackageExplorer" and
choose "Import". After that, go to "Android" -> "Existing Android
Code Into Workspace".
Now click "Browse" and choose unzipped SDK folder, and deselect all
other found projects, except from the "facebook" (it is an SDK).
Other included projects are just samples, and you don't need them now.
You may select "copy project to workspace" checkbox, if you need this.
Step 2. Fixing errors After importing, we will see, that the
whole facebook SDK package are in errors:
But if we look closer, and open one of marked as error classes, we
will find, that SDK tried to importsupport.v4 library:
It required for properly compilation. You can find instructions how to
download it using Android SDK Managerhere.
After it downloading, you can find it in your Android sdk folder:
<sdk>/extras/android/support/v4. Then add it to the facebook SDK
project: right mouse click on SDK project -> "Properties" -> "Java
Build Path" -> "Libraries" -> "Add External JARs", and choose
android-support-v4.jar from it's folder.
After that a lot of errors will be gone:
But, there are other errors. So we are going to another class, and
found it error code piece. Move mouse pointer on it, and Eclipse will
show you the hint, of what kind of error you are facing. It says that
your compliance Java must be version 1.7. Allow Eclipse do it by
clicking "Change project ...", or do it manually by going to
"Properties" -> "Java Complier" -> "Compiler compilance level"
-> "1.7".
OR
Moving ahead. Now we are facing only one kind of error, that says that
the FB SDK can't find required Bolts Android library.
We are going to google, found it compiled jar in a repository.
Choose the latest version (for current moment it's 1.2.0, but SDK
gradle file is using 1.1.4, so you may choose that), and download the
jar. Now add it to the facebook SDK as external lib, as we do it
before.
Voila! Ther are no errors anymore!
Also don't forget to set in the facebook SDK project "Properties" ->
"Android", that it is a Library.
Just for ensurance, close/re-open the SDK project and clean it
("Eclipse menu" -> "Project" -> "Clean"), so all files can build
properly.
Step 3. Add it to the Android project Now you can try to add
it to your Android app. Go to your Android app project "Properties"
-> "Android" -> "Library" -> "Add", and choose facebook SDK.
Follow official tutorial, and set up your Android application
project (don't forget to add all required elements to Manifest.xml).
Than you can use this tutorial to add LoginButton to your
Activity. Try to build it. It should run without problem.
This also might be helpful, if you find any issue: Facebook SDK v.4 for Android: errors on Eclipse
Check also: Android Facebook SDK configuration on Eclipse
Hope it help
EDIT: As you would see in the comments below, this answer is not already corrected. The best way to deal with this problem is export project from Eclipse to Android Studio, which doesn't have this issue and becoming the first Android Developer tool, where Eclipse seems to be as was said on Android Dev Summit 2015 truly deprecated.
Thank you so much! I'm still procrastinating migrating from Eclipse to Android Studio. And I found that the last version that works with Eclipse would be Facebook Android SDK 4.5.1. Download link here: https://origincache.facebook.com/developers/resources/?id=facebook-android-sdk-4.5.1.zip
Following this instructions make it work!

Importing Facebook SDK into my android project

I know there are lots of questions and articles about how to integrate android facebook sdk into an existing project. I have tried some of the methods they have but with no success.
I have imported the facebook (sdk folder) into a new project and have the resulting src, res folders in a separate project. I am still not sure how to integrate that with my already existing project.
I know I cannot simply copy and paste the java files into my project because there will be errors linking resources and other .java files as the package names and destinations will change.
What is the simplest way to do this?
Thanks.
Import the FB SDK to your workspace. Then open the properties dialog of your project.
Click the add button at the bottom of the dialog. Choose the FB SDK you have imported. Click Apply and Ok.
Look that (Spanish blog, you can translate)
http://fpalero.tk/facebook-sdk-para-android/
If you dont understand say me and i translate for you and explain all steps.
But it's easy, when you import sdk facebook only delete libs/“android-support-v4.jar” on your project and changes by the libs folder of sdk facebook.
see the facebook developers site for complete detail and for download Facebook SDK for any platform
facebook sdk download and integration sdk to project and also interaction to messenger with intent
Right click on your project in project explorer window >> Properties >> Andoird >> In the dialog poped >> click on Add >> Select the FB library >> Click ok
Facebook sdk will be added to your project.

Google play resources where not found

First of all. Please do not lock or report this thread. I've tried all similar stackoverflow questions and none have fixed my problem!
Since I've added the google play services lib to my project (and the external JAR file)
I keep getting the same error over and over again.
I've downloaded the google play libs with my SDK manager, I've imported the project and then I referred to the play library in my app and added the external JAR file.
Pictures:
Can anybody tell me what I did wrong or how I can fix this problem?
I'm just trying to make my app login with Google+ really..
Thank you
~Yenthe
Since I've added the google play services lib to my project (and the external JAR file) I keep getting the same error over and over again.
Its a library project and you to reference the same in your android project.
I've imported the project and then I referred to the play library in my app and added the external JAR file.
Remvoe the external jar. Reference the library project as below.
http://developer.android.com/google/play-services/setup.html
If you are using android-studio follow the steps in the above link under the title Using Android Studio:
If you are using eclipse as a in IDE.
Copy the google-play services_lib library project to your workspace (folder where your android map project is). The library project can be found under the following path.
<android-sdk-folder>/extras/google/google_play_services/libproject/google-play-services_lib library project .
Import the library project to your eclipse
Click File > Import, select Android > Existing Android Code into Workspace, and browse the workspace import the library project. You can check if it is library project. Right click on the library project. Goto properties. Click Android on the left panel. You will see Is Library checked.
Right click on your android project. Goto properties. Choose Android on the left panel. Click on Add and browse the library project. Select the same. Click ok and apply

Referencing the Facebook SDK in my Android project

I'm trying to reference the Facebook SDK to my existing Android project. I've been going through the given tutorial in the Facebook site. So here's what I've done:
I copied the Facebook SDK folder to my workspace.
Went to Project->Properties->Android
Set the "Is Library" radio button to true and pressed on the "ADD" button.
But I don't see in the popping dialog anything, it's just blank, no SDK.
What am I missing here?
Here's the workspace folder, and the Facebook SDK folder is located in it:
And here's the Android Properties. As you can see there's no Facebook SDK there. It's just blank:
So here's what you've done:
Copied the Facebook SDK folder to my workspace.
Went to Project -> Properties -> Android
Set the "Is Library" radio button to true and pressed on the "ADD" button.
Well, you are not supposed to do the Steps 2 and 3. The Facebook SDK is already coded to be a library project and you just need a reference to it in your existing application. Hence, the ADD button should be pressed in the existing project and it should reference the Facebook SDK.
Here is what you need to do :
Go the website and get the contents by using git or just zip everything using the ZIP button
Put the Facebook SDK folder in your workspace (no need to select it "Is Library" )
Select your Existing Android Project
Right Click -> Properties -> Android
In the Library section, click on Add (by doing this step you are adding a reference to the Facebook SDK in your existing application)
Select Facebook SDK there
You are good to go!

Android Facebook SDK configuration on Eclipse

I downloaded the android's facebook sdk but so far I couldn't configure properly. Eclipse doesn't recognize the facebook sdk as a project.
Does anyone got this problem?
You should use the git plugin to import the facebook project from github into your eclipse workspace. It's configured as an android library. And then in your android project in which you want to use the library. Right click on the project and choose properties. Click on the Android tab, and at the bottom should be a section for libraries, detailed instructions here. Click Add, and the facebook sdk should appear. Check the facebook sdk and it will then be available in your app.
Facebook SDK integration into an android application should be easy, but there are some caveats to take care of during the first integration steps, so follow it carefully:
Download the SDK from git hub - This could be done using a github client, but an easier way is to simply download the zipped version by pressing the "zip" button as appears in the following snapshot.
Extract the zip file - make sure to extract it into a folder that is not within the eclipse workspace. In the next step you will need to create a project in eclipse based on this zip, but sometimes, putting the extracted zip directly into the workspace confuses eclipse, so avoid putting it there. Put it somewhere else.
Open Eclipse and create a new Android Project (File -> New -> Project -> Android Project) for the Facebook Android SDK source. (On the next step you will add it as a reference library to your app). Create the project by selecting "Create project from existing source" and specify the facebook-sdk folder into which you extracted the zip.
(note: if you want it to be stored in the workspace itself, you can always "import" the project into the workspace later on)
Add it as a project library to your app by selection the current project (of your app) -> properties, and add the facebook project as a library to your current project.
later steps include adding permissions to the Android Manifest such as
uses-permission android:name="android.permission.INTERNET"/>
and then adding your application ID into the code. I will skip the details here as it is quite straight forward.
following steps are for creating facbook-android.jar (use this jar file in your any project)
Step1: Download Facebook Android SDK from github.
Step2: Extract it. (at any location).
Step3: In Eclipse create new project using create project from existing source option
Step4: Enter the project name as "com_facebook_android".
Step5: Set Location to "facebook" folder in extracted location.
Step6: Click Finish.
Step7: Select the "com_facebook_android" project in project explorer and right click select export option.
Step8: In the export wizard select JAR file in Java folder.
Step9: Click next then browse the location for jar file and give the name as yor wish like "facebook-android.jar"
Step10: Click finish........ JAR file will be created in that location
This is not correct process, you should use facebook-android project as library project, because resource files will not import to your project while you are using .jar file
jar file is only for Java Projects not for Android Project, Some of jar files may work but not all..

Categories

Resources