Facebook SDK导致EasyTracker出错

时间:2014-06-25 06:44:00

标签: android facebook easytracker

我的问题是,当我将facebook sdk添加到我当前的android项目时,它会导致错误

public void onStart() {
    super.onStart();
    EasyTracker.getInstance(this).activityStart(this);  // This is where the error is.
  }

错误是:

EasyTracker类型中的方法getInstance()不适用于参数(MainActivity)

没有facebook sdk没有错误,easytracker工作正常。

我也得到了这个错误..

Found 2 versions of android-support-v4.jar in the dependency list, but not all the versions are identical (check is based on SHA-1 only at this time).
All versions of the libraries must be the same at this time.
Versions found are:
Path: /home/david/workspace/android/BodyBuilding 101/appcompat_v7/libs/android-support-v4.jar
Length: 648327
SHA-1: ded9acc6a9792b8f1afc470f0c9cd36d178914cd
Path: /home/david/android-sdks/extras/facebook-android-sdk-3.15.0/facebook/libs/android-support-v4.jar
Length: 621451
SHA-1: 5896b0a4e377ac4242eb2bc785220c1c4fc052f4
Jar mismatch! Fix your dependencies

请帮助..

1 个答案:

答案 0 :(得分:0)

当我将sdk添加为库时,我遇到了与EasyTraker和Facebook sdk相同的问题。问题是不同版本的android-support-v4.jar之间的干扰。所以我的解决方案是删除其中一个并用其他android-support-v4.jar文件替换它。