An issue with Facebook SDK for Android sample projects

*爱你&永不变心* 提交于 2019-12-11 11:07:33

问题


I imported Facebook SDK to Eclipse, along with some sample projects. I had red X on all of them, but I managed to fix. Now I still some red X's. When I look at java files of these projects, where there are errors (for example a line such as this: setContentView(R.layout.main); I see the following error:

R cannot be resolved to a variable.

When I look at the main.xml layout file, I see an error like that:

Multiple annotations found at this line:
- error: No resource identifier found for attribute 'confirm_logout' in package 
 'com.facebook.samples.hellofacebook'
- error: No resource identifier found for attribute 'fetch_user_info' in package 
 'com.facebook.samples.hellofacebook'

I tried to go to Android tools -> Fix project properties, but that didn't help. What is the problem and how can it be fixed?


回答1:


Try going to Project > Clean all projects > OK and see if that helps. If not, it probably has to do something with your build path, dependencies or a combination of it all. Eclipse is pretty fragile in these circumstances. If you go to the "Problems" tab and paste the different errors you're having it might provide us with more context to help you.



来源:https://stackoverflow.com/questions/13904559/an-issue-with-facebook-sdk-for-android-sample-projects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!