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.
Related
I've just tried to get into Android development, but somehow I can't get my project working properly. I followed the "Getting Started" guide (http://developer.android.com/training/basics/firstapp/creating-project.html), but I'm stuck on building my project.
Everything is going fine but the creation of my MainActivity. I've left all the settings regarding the activity to default. Somehow when I create my project, there's no activity definition in the AndroidManifest.xml.
I've two potential solutions, but none of them seem to work. The mainly suggested workaround is to update the ADT Plugins through the correct repository (Eclipse android project not creating blank activity). However in my situation the updater states that I've already got these packages installed.
The other possible solution was to remove the support library from the SDK manager. After that, trying to create a new project in Eclipse should prompt me to install this package. Somehow I don't seem to get this prompt. (https://stackoverflow.com/a/11260656/3786210).
Are there any other possible solutions I could try out to get my project correctly built? Thanks in advance!
Additional information:
Windows 8 (64 bit)
ADT packages version: 23.0.0.1245622
Target SDK and Compile With: Android 4.4 (KitKat)
You should just yse IDEA instead of Eclipse
http://www.jetbrains.com/idea/download/
Eclipse sometimes can produce such problems
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
Using 3.6.2. When I choose to create a new Android Project, I enter a name, 'FirstProject' but the Finish button remains hollow and I cannot get past creating the project.
I did a little Google research and found a common cause of this is that the support folder that exists in the SDK's extras folder needs to be duplicated and the duplicate named to compatibility. I've done this now, and restarted Eclipse, but this still hasn't fixed the issue.
I also read that Juno causes this problem, but I'm not using Juno.
Has anyone experienced this problem before? Very eager to start an Android App!!
EDIT: A screen of the error:
You need to choose a Build SDK. If there is nothing in that drop-down, please visit the SDK Manager (Window > Android SDK Manager) and download one or more SDK platforms and associated emulators.
Make sure you add the SDK in Eclipse otherwise you will download them all and scratch your head on why they are not working.If you launch SDK manager form SDK folder and not from Eclipse it does not seem to register in Eclipse that you have downloaded these files. Took me several hours for something that should have taken only one or so.
After several years with Eclipse and Android development this combination is driving me nuts.
On every start of Eclipse the lib settings I've configured on the page 'Project/Properties/Android' section 'Lib' need to be re-applied.
After a Eclipse restart all existing projects are marked in red. For every project I have to select that project, change to the page described above, remove all Libs, hit Apply, re-enter the same Libs and hit apply again. .classpath and .project look ok. It's the latest Android SDK and the latest Helios Eclipse release. MotoDEV is installed as plugin.
This is a stupid and time-consuming process. Please, has anybody an idea what's wrong with Eclipse (or the Android SDK) or my configuration?
Many thanks in advance.
Which OS are you using and is it 32- or 64-bit? Are you logged in as root/administrator or as a regular user? This sounds suspiciously like the ~/.eclipse folder isn't getting written correctly. We can look at this in MOTODEV Studio and see if it's something unique to us, but it definitely is strange behavior.
Update: one of the MOTODEV Studio team says this is a known bug in ADT when using linked folders. http://code.google.com/p/android/issues/detail?id=14217
i put this question in this forum because i am not sure whether this is an eclipse error or an Android error.
yesterday i created an Android application using Google Maps and GPS on Eclipse and it build and ran successfully however today i wanted to do some modification to the code so i started eclipse but it gave me an error.
SDK parse failed
if i try to run it. it says the apk cannot find. how can that be happened? the same application ran successfully on the same environment yesterday. i am using Ubuntu 10.04
Thanks !!
There is a problem with your project, as evidenced by the red x icon on your project title bar shown in the image above. Right-click your project, choose Properties and go through all your properties to make sure they are all still valid. It might be a reference to one of the jar files.
I get this problem all the time, hopefully my solution works for you.
To work around, goto your libraries inside the properties page.
Add any library and then rebuild your project.
Go back and remove the library later for clean up.
The project should still build.