sromku / android-simple-facebook

[Deprecated] Simple Facebook SDK for Android
Other
878 stars 349 forks source link

Error on configuring #419

Closed Victorgf87 closed 8 years ago

Victorgf87 commented 8 years ago

Hello, I updated my dependency in my project, and now I'm getting this error when building configuration:

java.lang.NoSuchMethodError: No static method getAPIVersion()Ljava/lang/String; in class Lcom/facebook/internal/ServerProtocol; or its super classes (declaration of 'com.facebook.internal.ServerProtocol' appears in /data/data/es.smartmenu.cartadigital.vinos.restaurantes.debug/files/instant-run/dex/slice-slice_0-classes.dex) at com.sromku.simple.fb.SimpleFacebookConfiguration$Builder.(SimpleFacebookConfiguration.java:166)

My method is like this:

    public void onCreate() 
{
    super.onCreate();

    Logger.getInstance(Appli.this).log("Appli", "Starting application", 0);

    //Configuration for Facebook object
    SimpleFacebookConfiguration configuration= new SimpleFacebookConfiguration.Builder()
        .setAppId(getString(R.string.app_id))
        .setNamespace(getString(R.string.fb_namespace))
        .setPermissions(facebookPermissions)
        .build();

    //Configure facebook data
    SimpleFacebook.setConfiguration(configuration);
}

Has anyone run into this?

Victorgf87 commented 8 years ago

I'm sorry, the problem seemed to be that I had duplicated dependencies.

ArunkumarKAndanshetti commented 7 years ago

FATAL EXCEPTION: main Process: com.ondemandbay.taxianytime.driver, PID: 7104 java.lang.NoSuchMethodError: No static method getAPIVersion()Ljava/lang/String; in class Lcom/facebook/internal/ServerProtocol; or its super classes (declaration of 'com.facebook.internal.ServerProtocol' appears in /data/data/com.ondemandbay.taxianytime.driver/files/instant-run/dex/slice-com.facebook.android-facebook-android-sdk-4.20.0_2df9bd60de02704e486702ea6f1502ee3426b9c4-classes.dex) at com.sromku.simple.fb.SimpleFacebookConfiguration$Builder.(SimpleFacebookConfiguration.java:166) at com.ondemandbay.fragment.RegisterFragment.onCreate(RegisterFragment.java:139) at android.support.v4.app.Fragment.performCreate(Fragment.java:2075)

Please help me sir...

ArunkumarKAndanshetti commented 7 years ago

I am getting same error getAPIVersion()

Please help me sir...

ArunkumarKAndanshetti commented 7 years ago

What problem I'm facing right now : please help me....... java.lang.NoSuchMethodError: No static method getAPIVersion()Ljava/lang/String; in class Lcom/facebook/internal/ServerProtocol; or its super classes (declaration of 'com.facebook.internal.ServerProtocol' appears in /data/data/files/instant-run/dex/slice-com.facebook.android-facebook-android-sdk-4.20.0_2df9bd60de02704e486702ea6f1502ee3426b9c4-classes.dex)

Please help me