且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

找不到Android上app.how类异常的Facebook?

更新时间:2022-06-15 19:40:56

我在哪里见过的Eclipse似乎忘了,包括从其他项目中的类,你的Andr​​oid应用内依赖于之前类似的错误。不知它可以在一个状态获取在那里可以看到的类编译和检查存在与清单等,但不将它们打包没有问题。有时它是通过消除依赖,并把它背可以解决的。

I've seen similar errors before where Eclipse seems to forget to include the classes from another project that you depend on inside your Android app. Somehow it can get in a state where it can see the classes for compiling and checking there are no problems with the manifest, etc. and yet not package them. Sometimes it is fixable by removing the dependency and putting it back.

这是从该网站下载的,你应该有两个项目。 Android的项目被称为fbconnect样本。 Java项目被称为fbconnect-机器人。首先要确保你有两个项目,而且都没有被显示在Eclipse Problems视图中的任意构建问题。项目菜单,然后自动构建应该进行检查。 Package Explorer中应列出fbconnect,机器人和fbconnect样本。窗口菜单 - >显示视图 - >问题不应有构建问题。

From the download from that site you should have two projects. The Android project is called fbconnect-sample. The Java project is called fbconnect-android. First make sure you have both projects and that neither is showing any build problems in the Eclipse Problems view. Project menu, then Build Automatically should be checked. Package Explorer should list "fbconnect-android" and "fbconnect-sample". Window menu -> Show View -> Problems should show no build problems.

如果你没有这两个项目,他们通过转到文件菜单中创建,然后导入...,然后导入现有的项目到工作区,然后选择从fbconnect-android.zip下载提取fbconn目录。这两个项目应该根据项目显示:在对话框中的标题,然后点击完成。该fbconnect-Android项目的需要,以建立一个没有问题的ANDROID_JAR CLASSPATH变量设置为从SDK中的android.jar。

If you don't have both projects, they are created by going to the File menu, then Import..., then Import Existing Projects into Workspace, then choosing the fbconn directory extracted from the fbconnect-android.zip download. Both projects should show under the Projects: heading in the dialog, then hit Finish. The fbconnect-android project needs an ANDROID_JAR classpath variable set to the android.jar from the SDK in order to build without problems.

现在,要尽量去除的依赖,并把它背的解决方法,右键点击Project Explorer中的fbconnect样本项目,选择属性,那么Java构建路径,然后项目,然后fbconnect-机器人,然后取出,然后好。现在,右键点击fbconnect样本再次,那么Java构建路径,然后项目,然后添加,然后fbconnect,机器人,然后确定,然后确定。有时后做了Eclipse开始从你的APK再根据项目包装类。就我而言,此下载,样品跑到我的Droid手机上没有罚款的。刚刚导入现有项目和以去除全部的构建问题设置CLASSPATH变量已经足够了。

Now, to try the removing the dependency and putting it back workaround, right click on the fbconnect-sample project in the Project Explorer, choose Properties, then Java Build Path, then Projects, then fbconnect-android, then Remove, then OK. Now right click on fbconnect-sample again, then Java Build Path, then Projects, then Add, then fbconnect-android, then OK, then OK. Sometimes after doing that Eclipse starts packaging the classes from the project you are depending on in the APK again. In my case, for this download, the sample ran fine on my Droid phone without that. Just importing the existing projects and setting the classpath variable in order to remove all the build problems was enough.