简体   繁体   中英

Fackbook SDK causing error with EasyTracker

My problem is that when I add the facebook sdk to my current android project it causes and error with

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

The error is :

The method getInstance() in the type EasyTracker is not applicable for the arguments (MainActivity)

With out the facebook sdk there is no error and easytracker works fine.

I also get this error..

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

Please help..

I had the same problem with EasyTraker and the Facebook sdk when I added the sdk as a library. The problem seams to be the interference between the different version of android-support-v4.jar. So my solution was to delete one of them and replace that with the other android-support-v4.jar file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM