适用于Android示例项目的Facebook SDK出现问题 [英] An issue with Facebook SDK for Android sample projects

查看:338
本文介绍了适用于Android示例项目的Facebook SDK出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Facebook SDK和一些示例项目导入了Eclipse.我都对它们使用了红色的X,但是我设法解决了.现在我仍然有一些红色的X.当我查看这些项目的Java文件时,哪里有错误(例如这样的行:setContentView(R.layout.main);我看到以下错误:

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.

当我查看main.xml布局文件时,看到这样的错误:

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'

我尝试转到Android工具->修复项目属性,但这没有帮助.有什么问题,如何解决?

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?

推荐答案

尝试转到项目">清理所有项目">确定",看看是否有帮助.如果没有,它可能必须对您的构建路径,依赖项或所有这些进行组合.在这种情况下,Eclipse相当脆弱.如果您转到问题"标签并粘贴其他错误,则可能会为我们提供更多帮助您的上下文.

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.

这篇关于适用于Android示例项目的Facebook SDK出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆