Getting error while trying to install Facebook SDK for Android - android

I'm trying to install the Facebook SDK for Android in Eclipse but I'm failing miserably.Eventually my aim is to develop a web app in phonegap and I know I have to get the phonegap plugin for that once I sort out the SDK. But Im failing at the very beginning.
I'm sure I followed all the steps that was laid out in the FacebookSDK-Android guide.Im attaching screen shot of the errors I'm getting to give you guys a better picture.I'm completely new to Android, any help much appreciated.Thanks
https://vimeo.com/69957972
http://i.stack.imgur.com/XnK4O.png
http://i.stack.imgur.com/etxPh.png

Im am getting the same error just as yours, I tried all the methods you mention here.
Same screens I was getting.
The soultion I got is:
You need to create a new clean workspace before importing the facebook SDK
Goto File>>Switch Workspace
When you enter a new path for your workspace, Now import the Facebook SDK and MUST clean the projects as:
Project>>clean
There will be no problems at all. I am now running my applications in my device too without any issues.

You already mentioned that you follow the official installation guide for the Facebook SDK, but I provided a link just in case:
https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/
When I read the guide, my eye caught onto something which might prove to be the source of the error which you experience:
You must unselect the 'Copy projects into workspace' option so that each of the sample projects retains a correct reference to the neighboring SDK. However, this means that Eclipse creates a link to the project in the SDK installation, rather than making a copy of it.
Please let me know whether or not this helps.

Try this:
Right click on the project in the Package Explorer.
Select Android tools->Add support library
Select the latest support library (current rev 13)
Accept License and press install
For the example projects. Check that the path to the library 'facebook.jar' is correct
Right click on the project in the Package Explorer.
Select Properties
Select Java Build Path
Select Libraries
Check that the 'facebook.jar' path is correct

Related

Android SDK missing in Intellij Idea Community After installation

I am not able to resolve the error of Android SDK missing in Intellij-idea i tried as instructions mentioned in the image also i searched it on google and also tried some methods of stack overflow but it's still not resolved so please if anyone know then suggest the solution for it...enter image description here
This post (How do I set up IntelliJ IDEA for Android applications?) helped me, but had to download Android Studio and install the tools through the wizard when first launching the program.
Then I started IntelliJ and created a new project (not Android) and went to File>Project Structure and added a new Android SDK under SDKs. You have to choose the path to the SDK int the finder. To do this make sure Library is visible (see here: http://www.macworld.com/article/2057221/how-to-view-the-library-folder-in-mavericks.html) and go to Libraries>Android and choose to open SDK. After that I no longer had the problem of not finding the SDK when creating a New Android Project.

Unable to configure Facebook SDK in eclipse

I did all the steps according to the facebook tutorial on how to configure the facebook SDK, and without any luck, also tried the github configuration as shown Android Facebook SDK configuration on Eclipse
And I'm still getting in the eclipse environment a "!" sign by the side of the project I included Facebook to it. and when trying to run, it says I have errors.
Without the Facebook SDK I managed to work great on my project and run it, so it is not a problem with my project..
What can I do?
I was trying to get started using Facebook's SDK for Android with Eclipse and couldn't get it to work. After trying different things here is the solution that consistently works:
1) Import (File->Import->Existing Android Code Into Workspace) just the Facebook SDK folder alone (PATH\facebook-android-sdk-3.0.1). (Do not check the copy to workplace)
2) Import (i.e. PATH\facebook-android-sdk-3.0.1\samples\ProfilePictureSample) just one of the sample projects (for now). I will be using ProfilePictureSample as an example
As you can see, Eclipse throws errors saying that it doesn't know what FragmentActivity in ProfilePictureSampleActivity. FragmentActivity is part of the android support library. If you take a look at the package explorer, there is not a libs folder or any reference to the android support lirbary; It is on the FacebookSDK library. We need to tell Eclipse to export it.
4) Right-Click on the FacebookSDK library then click on properties. On the left menu go to Java Build Path. Then under the Order and Export tab check Android Private Libraries (you can also click on the android-supportv4-jar instead).
5) Project->Clean
Now for some reason (maybe somebody can elaborate on this), the sample project also needs to export the android support library.
6) Right-Click on the sample project (i.e. ProfilePictureSample) then click on properties. On the left menu go to Java Build Path. Then under the Order and Export tab check Android Private Libraries.
7) Project->Clean
Hopefully this helps!!
please set the Android Api for this project by this steps below
Rightclick on project->properties->android->set android Target version
Also remove Facebook library project once and again add it.
The problem was that the path to the android-supprort-v4.jar wasn't correct..
Fixed it by setting the correct path.
Import the sdk without copying the project to workspace. this solution has worked for me and does not present any errors

Android Facebook SDK Can't Add Project

I have been following the tutorial found below and am having issues adding the Facebook SDK.
https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/
It occurs when I get to the stage of "Link to the SDK project and configure the Facebook app ID".
When I go to Properties -> Android -> Add and add the FacebookSDK, it seems to work fine. However when I save and close that page, and go back into it, there is a big X against the reference.
I have tried going into project properties and changing it from a relative url to a full url as such:
FROM android.library.reference.1=../../facebook
TO android.library.reference.1=/Users/michael/Documents/facebook-android-sdk-3.0/facebook
Without this working properly I can't do anything with the Facebook SDK.
I am on Mac OSX and have no idea what else to do in the Eclipse ADT
FacebookSDK project must be on the same part of HDD as the user's project.
For example:
E:\Facebook Android SDK 3.5 - FacebookSDK project
E:\Work\Restaurant - User's project
It works for me on Windows 7. Maybe, it will help you on your OS too.
Look at your console. You might have a dependency error with the android support jar. I just had this issue a couple of days ago. If this is the case you will need to delete the jar out of your main project and copy the android support jar from the facebook SDK into your project.
EDIT: if this isn't the issue let me know, I think I ran into every issue possible implementing Facebook into my app. I am pretty sure I can help get you connected.
Sorry, issue resolved. Eclipse was being odd. After restarting the program everything worked correctly.

Eclipse: Java Build Path is missing

I'm trying to use Google's SDK Tutorial for Android using Eclipse. I was able to get the first two projects to work, but when running the third R.java disappeared so I gave up on that.
I made a brand new package out of the solution set for exercise 3. It was full of errors, like files being in src/com/android... instead of com/android. I fixed that, but it still wouldn't build.
I went to the project -> properties -> Java Build Path, but Eclipse throws an error: "The currently displayed page contains invalid values." It then doesn't load up that window at all.
What am I doing wrong? How can I import this project properly?
Please check your Window>Preference>Android>sdk location --- is set to be the path of android sdk and if it not works then please go with new eclipse software delete previous check jdk is install and after that set correct android sdk location to above path.
Thanks
If the first two projects still work, then your studio is probably deployed properly.
You might want to check if you have a build target set.
Right click on project->android->target name.
Otherwise, might make sense to re-download eclipse and reinstall the google adt plugin.

"Android library projects cannot be launched" in Facebook Android tutorial

I installed both the Android and Facebook SDKs. I did all the steps in http://developers.facebook.com/docs/mobile/android/build/#sdk till Step 6.3.
In step 6.4, when I try to run the project in Emulator (Using Android 4.0.3), I get "Android library projects cannot be launched" and the project doesn't proceed further. Even the logcat doesn't have any content.
Can someone please tell me what may be the problem?
Thanks
Souvik
Folow these steps
1. In the Package Explorer, right-click the library project and select
Properties.
2. In the Properties window, select the "Android" properties group at left and
locate the Library properties at right.
3. Select the "is Library" checkbox and click Apply.
4. Click OK to close the Properties window.
Library projects cant be launched. you can use that in your project and run your project adding it as library.
It would be much better to have the Facebook sdk as a Library so you can simply #import the sdk file into eclipse. Simple. I spent a day trying to get the sample source into a project to test the post on wall. I get the app to run but no breakpoints get called in my project, I had to create the build.xml and not sure if that is the cause. It would be better if the whole test project files were included instead of only the resources and jar files. That way you could just import everything and it should work within 5 mins.

Categories

Resources