Hello I am trying to learn a little bit of facebook-sdk for android but no luck.
I will post some screenshots so you easy understand what is my problem.
1st step I am adding the SDk to my project
2nd step I import Classes but i get an error
And when I am going back to android tab I see this
Really need help. I tried Many times to follow the steps from FB Guide in case I forgot something but didnt helped... Thank you in Advanced.(I am new to this hope you will understand)
Your "Jar mismatch" problem comes into picture because of the Facebook SDK itself has android support v4 jar as well as your project also same jar file.
To solve this problem..
Go to your project's properties -> Java Build Path -> Order and Export :
Now remove the Tick-Mark from Android Private Libraries.
make sure that you had already used facebook SDK's private library (tick-marked)
And then after clean your work space..
It will always help me..
Hope this will help you to solve your problem.
Related
I am using android studio to import this project called https://github.com/Pixate/pixate-freestyle-android. However when I import it into android studio the folder under samples, freestyleshowcase doesnt seem to build. The other 2 samples buld correctly. There is a red circle around the java file with a J (error) but there is no error in the file itself. COuld someone please help me out?
You are obviously missing some libraries but it is going to be hard for anyone to tell you which since we do not know the libraries the project needs.You can try Build-->Rebuild Project or Build-->Clean Peoject if it still doesn't work, close and open Android Studio.
If that doesn't work also then you have to go the hard way of identifying the libraries need by the project samples you imported and see if you have them.
When in doubt, you can try the Library Dependency option (using Maven) as demonstrated here:
https://www.youtube.com/watch?v=6BUcx9gGQ3o
That way, you won't have to manually edit the build.gradle file.
When i run my project , I get " Your project contains error(s) , please them before running your application" this error . I searched this error on Google , There i got a lot of solutions all these did not work for me . I cleaned and Build my project , Restart my eclipse , in .android deleted debug.keystore and clean and build my project , But did not work for me . Please help me .
Thanks in Advance
Follow My steps :
There are many possiblity of this type of error try by one of the following .
Step 1 Right Click on your app then check library and order and export tab there may
be any error remove that according to your project .
Step 2 Right Click on your app then go to java compiler and made change of
compiler level
Step 3 If you have added any library project check that also
It works for me hope it will work for you also .
In my case, all the solutions you generally come across in the Net turned out inappropriate.
What I have recently found is that if you wanted to import a given Android project,
and you used General/Existing Projects into Workspace or Archive File,
you may probably face the issue above when there is no problem in the source itself.
What I did was using [Existing Android Code Into Workspace] instead of the above.
With this authentic way of importing Android project, such an error did not come about.
//
Of course, this applies when you properly added some necessary libraries and you have
no issue with your source codes.
Hey I know this was asked before, but none of the solutions seem to help.
This is NOT a duplicate
I have used the Facebook SDK before on an earlier project,
now I started a new one and I get this weird error.
I have set a reference to the library
I have set the Facebook SDK project as a library
I have tried deleting it and re-adding it according to the official documentation, and basically tried everything in this question.
Though I still get this error and can't find out why.
Worth to mention, when I tried to use the facebook class, it gave me an error with an option of "fix project", which I did and still didn't work, might be related?
This is common error. Just remove FacebookSDK project from Properties->Java Build Path->Projects . This project should be referenced from Properties->Android
For more information, see this answer: Could not find Library.apk!
Well, after alot of searches the only thing that worked for me is just creating a new project and copying all the files to it.
I tried avoiding it but that seems like the only thing that works =/
As there is no answer on this topic whatsoever, so if someone could find out a better solution - it will be very helpfull to the community
Hmm.. I just want to ask whether did you import the Facebook SDK into Eclipse itself? Because I had did a project using Facebook and the thing is that besides referencing, the guide I followed actually instructed that the SDK must be imported into the Eclipse.
You might probably want to have a look at this. Else, the other way is just like what you did, copying all the files.
Try deleting the Facebook application for Android (if you have one installed on your phone). This worked for me.
i dont know how this is happened but it works :
first : i have added all facebook3.0 related sample + facebookSDk projects in one workspace .
second : i have run a sample project . in which i found a .jar file :
androiddependencies->facebooksdk.jar (note this exact path )
third :
1.) i created my project .
2.) inside this i have removed errors by :- FixProjectSetup (atLast position )
3.) i have added facebooksdk.jar by right_clicking at project->properties->android->by checking android 4.2 + reference the Facebooksdk -> done .
now i am able to create and run programs easily .
I have a question to which I have not found an answer, sorry if repeated
I upgraded to sdk and ADT 17 and since then every time I open a project leading, for example, advertising admob google gives me error:
Could not find class 'com.google.ads.AdView' ...
This strikes me in all projects that include libraries (jars)
I have read about in this SDK has changed something about it, but my English is not very good (use google translator) and I understand that I am doing wrong.
I appreciate any help.
Best regards
Quoting Xav:
If you have ClassDefNotFoundError after updating to r17, make sure to read the following links:
http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17 shows how to fix the problem with nice pictures of what the project should look like.
http://tools.android.com/recent/dealingwithdependenciesinandroidprojects
(this was linked from the blog post and from the release notes) explains in detail how the new dependency system works.
Well, after hours of research , I found a simple solution.
Click on your Android Project
Select Properties
Select Java Build
Path Select Order and Export
Check all your references
Thats all !
i downloaded the smspopup app for android from android-smspopup using svn, now i opened the project in eclipse. i did the following:
1) Build Project;
2) Android Tools -> Fix Project Properties;
3) Project -> Clean.
Now, for the following java classes:
1) SmsPopupActivity;
2) SmsPopupPager.
It says that it cannot resolve the following:
import com.jakewharton.android.viewpagerindicator.CirclePageIndicator;
I downloaded the Android-ViewPagerIndicator. Now, i try to add it using the Properties -> Android -> Add Library. But it does not let me add anything. Please can you help me to resolve this problem... I would really appreciate if someone could explain how to solve this problem step-by-step. Thanks a lot in advance!!!
I encountered the same problem with you,and i finally found the solution on the site of https://github.com/JakeWharton/Android-ViewPagerIndicator.
Android-ViewPagerIndicator is presented as an Android library project. A standalone JAR is not possible due to the theming capabilities offered by the indicator widgets.
You can include this project by referencing it as a library project in Eclipse or ant.