eclipse 找不到 Facebook SDK.apk
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10971904/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Could not find Facebook SDK.apk
提问by eric.itzhak
Hey I know this was asked before, but none of the solutions seem to help.
嘿,我知道之前有人问过这个问题,但似乎没有任何解决方案有帮助。
This is NOTa duplicate
这不是重复的
I have used the Facebook SDK before on an earlier project, now I started a new one and I get this weird error.
我之前在一个早期的项目中使用过 Facebook SDK,现在我开始了一个新的项目,但出现了这个奇怪的错误。
- I haveset a reference to the library
- I haveset the Facebook SDK project as a library
- I havetried 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?
值得一提的是,当我尝试使用 facebook 类时,它给了我一个“修复项目”选项的错误,我做了但仍然没有工作,可能与此有关?
采纳答案by eric.itzhak
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
由于这个主题没有任何答案,所以如果有人能找到更好的解决方案 - 这将对社区非常有帮助
回答by kolobok
This is common error. Just remove FacebookSDK project from Properties->Java Build Path->Projects . This project should be referenced from Properties->Android
这是常见的错误。只需从 Properties->Java Build Path->Projects 中删除 FacebookSDK 项目。这个项目应该从 Properties->Android 引用
For more information, see this answer: Could not find Library.apk!
有关更多信息,请参阅此答案:找不到 Library.apk!
回答by eric.itzhak
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.
嗯..我只是想问你是否将Facebook SDK导入Eclipse本身?因为我曾经用Facebook做过一个项目,事情是除了引用之外,我遵循的指南实际上指示必须将SDK导入到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.
你可能想看看这个。否则,另一种方式就像您所做的一样,复制所有文件。
回答by Rayhunter
Try deleting the Facebook application for Android (if you have one installed on your phone). This worked for me.
尝试删除 Android 版 Facebook 应用程序(如果您的手机上安装了该应用程序)。这对我有用。
回答by Tushar Pandey
i dont know how this is happened but it works :
我不知道这是怎么发生的,但它有效:
first : i have added all facebook3.0 related sample + facebookSDk projects in one workspace .
第一:我在一个工作区中添加了所有与 facebook3.0 相关的示例 + facebookSDk 项目。
second : i have run a sample project . in which i found a .jar file : androiddependencies->facebooksdk.jar (note this exact path )
第二:我已经运行了一个示例项目。我在其中找到了一个 .jar 文件:androiddependencies->facebooksdk.jar(注意这个确切的路径)
third :
第三 :
1.) i created my project .
1.) 我创建了我的项目。
2.) inside this i have removed errors by :- FixProjectSetup (atLast position )
2.) 在这里面我已经通过以下方式删除了错误:- 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
.
3.) 我是facebooksdk.jar
通过 right_clicking添加的project->properties->android->by checking android 4.2 + reference the Facebooksdk -> done
。
now i am able to create and run programs easily .
现在我可以轻松地创建和运行程序了。