I'm trying to import facebook sdk libraries into my android project and I successfully imported them . Now I want to import facebook sdk classes into my project, but I can't import them. What is the problem ? What am I doing wrong ? And when I checked again that fb sdk are added or not I see This error. Please help me out if am doing any thing wrong
I don't know if this is a good way but I uploaded a video on youtube and shared the link here, sorry for video's poor quality,but it's only a 25 seconds video.
cracked it after hours of frustration....
well it goes like this.
stand on the FaceBook Project you have created by the instructions of faceBook developers.
right click and choose the properties , choose android and choose an android API from the list , press apply and ok.
clean the project and see that the error disapeard.
now it's the time to go to your project , press the right click and choose properties.
go to Android , press the Add button and choose the faceBook project.
press applay and ok .
clean the projects just for good luck . and now you finally can impory com.facebook !
hope it will save some poor programmer valuble time in the future .
you should follow this steps and guide facebook
Your sdk and your project should be in the same path. If not the library will not be properly loaded. Check if your project is in the same path as your facebook sdk. Or copy the sdk to the same folder of your project and then load that as library.
The problem is that the Facebook SDK still remains in your C:/Downloads folder. You have to put it in your Eclipse Workspace and then import it. It worked for me!
I was facing a similar issue. My project work space was in another directory and the SDK in another and based on the tutorials, I preferred to keep them that way. The solution is to include the Facebook SDK into your project's build path. You could do this in properties or click on the error icons > organize imports and it should automatically give you an option to add the SDK (if found) into your build path. That should work!
Related
I'm building a client to connect to openfire server using smack(a xmpp library)
but I'm facing many problems.
This is the main code
Any kind of help will be highly appreciated. I also want to ask do I have to ask jxmpp library separatly? How can I resolve this error?
it seems like you are missing this library from Maven Repository which is : org.jxmpp:jxmpp-jid:1.0.3
follow these steps to download the missing library in intellij
click File -> Project Structure
click on libraries tab on the left
you will see a + sign in the window shown, click on it
you will see a drop down menu , choose from Maven...
in the search bar type org.jxmpp and hit search icon
give it a minute till end searching then hit the drop down and choose the library to import which is org.jxmpp:jxmpp-jid:1.0.3 , it will ask you where to download the jar file , choose the location and hit import , that should solve the problem of missing libraries
Thanks for your help in advance! I am having a problem with declared packages, I have downloaded parse from github for android, My project is named Parr, when I go to add it to my project, I click on Parr then right click on src and try to add it, also tried the same under com.examle.parr, I am importing it by going into the file system and selecting the parse project I downloaded, I am selecting to add it into Parr/src/com/example/parr. every class added is added under, package com.parse; I can change them all manually to package com.examle.parr; but their is way to many and I know there is a right way to do it, any help will be much appreciated. On a side note is android studio recommended for use with parse, I do not see any instructions to add it to eclipse on there website, just android studio
On a side note is android studio recommended for use with parse, I do not see any instructions to add it to eclipse on there website, just android studio
Android Studio is recommended for Android Development ,Google doesn't recommend to use Eclipse for Android Development , I would suggest you to switch from eclipse to Android Studio , Then will be much easier to solve the problems quickly you are facing now .
You can solve your problem in Eclipse too ,follow below steps :
1 . Download jar file from here
2 . Add this jar file to you eclipse project (Android)
3 . Rebuild project .
4 . Run project .
I am really very new on android development.
I have made 2-3 apps , those running on my android device already.
Last few days I am facing a stupid problem.
The problem is , creating the app fullscreen for every device. I have read phone gaps wiki
and tried with specific way. But I failed everytime.
When I'm trying to open the DroidGap.class from my Android eclipse project explorer , I got a error. that, "DroidGap.class has no source attached". (after build the phonegap.jar)
Please help me....
first you need to add phonegap.jar to your project
you need to add phone gap plugin to your eclipse
Use the AppLaud Eclipse Plugin for PhoneGap Android
Download and unzip the PhoneGap sources from GitHub
In the AppLaud wizard, select "Enter path to installed PhoneGap"
Enter the directory path to the unzipped sources from GitHub
Now you will be able to modify and debug the sources that comprise phonegap.jar
Caveat: I'm the creator of the AppLaud Plugin
fullscreen?
If you want modify DroidGap.class dowload source code from github and rebuild phonegap.
Rebulid instruction here: https://github.com/callback/callback-android/blob/master/README.md
I am very new to Android application development.
I successfully added some backgrounds to several layouts. And added media files to play. However when I rename a file in the folder structure, it shows an error that the resource does not exist.
But I can see those files in gen-><mypackage>->R.java->drawable.
Now my background pictures and resources do not appear in code.
R.layout.splashforproduct1 it shows an error for splashforproduct1.
not only splashforproduct1 but this issue is the same for R.raw.media.mp4
This is not first time I have got this issues. Please help me.
I am using Android 2.2 with eclipse.
If cleaning your project doesn't work try this: Scroll up to the top of the file and delete the import lines. Then wait for Eclipse to detect your changes and let it work out what you need to import and accept its suggestions.
I guess you just need to clean your project.
In Eclipse you do it clicking:
Project -> Clean and then you choose your android project.
I've installed the Facebook API for Android in Eclipse, and imported the project into my Android project. My program builds perfectly fine, but when I try to run it I get
Could not find com_facebook_android.apk!
in the build window, and when the program actually tries to import any of the Facebook API classes it blows up with a java.lang.NoClassDefFoundError: com.facebook.android.Facebook
Probably you added the reference to the Java project in the "Java Build Path" but it's the wrong place.
From the Android guide:
To add a reference to a library project, follow these steps:
In the Package Explorer, right-click the dependent project and select Properties.
In the Properties window, select the "Android" properties group at left and locate the Library properties at right.
Click Add to open the Project Selection dialog.
From the list of available library projects, select a project and click OK.
When the dialog closes, click Apply in the Properties window.
Click OK to close the Properties window
This resolved my problem.
Check out referencing libraries instructions here:
http://developer.android.com/guide/developing/projects/projects-eclipse.html
Make sure you have the latest versions of ADT.
Try to clean your project in eclipse.
Hope this helps
In my case helped, not to have in the referenced projects checked Is Library
(Project Properties > Android)
I am also having issues with this error and have noted that if I run eclipse as root then the error disappears. This makes me think it is a permissions issue
So to help:
On the com Facebook android project right click > android tool > build and export
Then simply build the project into the bin folder of the Facebook project.
Problem solved
I had a similar problem. This was my resolution. I had to add android.jar as a reference.
Android samples error
If nothing works, try deleting the Facebook application for Android (if you have one installed on your phone). This worked for me.