-3

我尝试编写一个可以登录 facebook 的应用程序。我使用 facebook sdk,所以我导入了 facebook sdk 中的类。

我去 Project-->Proprietes--->Android--->Library add Facebook SDK 但我收到以下错误(对于所有项目,我刚刚在 1.6 更改了 Java 编译器的属性):

0:37 - BooleanOGSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:37 - SessionLoginSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:37 - SwitchUserSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:37 - Hackbook] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:37 - Scrumptious] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:37 - FriendPickerSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:37 - ProfilePictureSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:37 - GraphApiSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:37 - PlacePickerSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:37 - HelloFacebookSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:38 - BooleanOGSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:38 - FacebookSDK] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:38 - FriendPickerSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:38 - GraphApiSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:38 - Hackbook] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:38 - HelloFacebookSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:38 - PlacePickerSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:38 - ProfilePictureSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:38 - Scrumptious] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:38 - SessionLoginSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:10:38 - SwitchUserSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:11:04 - BooleanOGSample] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:11:04 - FacebookSDK] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
[2013-04-18 22:15:29 - FacebookProvaSd] Found 2 versions of android-support-v4.jar in the dependency list,
[2013-04-18 22:15:29 - FacebookProvaSd] but not all the versions are identical (check is based on SHA-1 only at this time).
[2013-04-18 22:15:29 - FacebookProvaSd] All versions of the libraries must be the same at this time.
[2013-04-18 22:15:29 - FacebookProvaSd] Versions found are:
[2013-04-18 22:15:29 - FacebookProvaSd] Path: C:\Users\Francesco\Desktop\Android\Progetti Android\FacebookProvaSd\libs\android-support-v4.jar
[2013-04-18 22:15:29 - FacebookProvaSd]     Length: 393154
[2013-04-18 22:15:29 - FacebookProvaSd]     SHA-1: 307c1cc532eabbf1d135b43e5c983c9da700449d
[2013-04-18 22:15:29 - FacebookProvaSd] Path: C:\Users\Francesco\Desktop\Android\documentazione\Facebook\AltraSDK\facebook-android-sdk-3.0.1\facebook\libs\android-support-v4.jar
[2013-04-18 22:15:29 - FacebookProvaSd]     Length: 349252
[2013-04-18 22:15:29 - FacebookProvaSd]     SHA-1: 612846c9857077a039b533718f72db3bc041d389
[2013-04-18 22:15:29 - FacebookProvaSd] Jar mismatch! Fix your dependencies
4

1 回答 1

1

我在这里看到两个问题:

  1. Android 要求编译器合规级别为 5.0 或 6.0。而是找到了“1.7”。请使用 Android 工具 > 修复项目属性。
  2. 在依赖列表中找到2个版本的android-support-v4.jar

第一个问题应该很容易通过简单地按照说明解决。第二个问题也很容易解决。只需确保 Facebook 项目和您自己的 Android 项目都使用相同版本的兼容性库。最简单的方法是将两者都更新到最新版本。

于 2013-04-18T20:26:36.257 回答