1

I am trying to add Facebook social login along with wix react native navigation . After adding facebook package to my application and configuring as per its documentation, the app stopped working. It started giving error saying

Incremental java compilation is an incubating feature.

FAILURE: Build failed with an exception.

BUILD FAILED

I tried to follow this thread React Native - Run Android - Could not find common.jar (android.arch.core:common:1.0.0) Tried adding the code below in the android.builde But that doesnt fix the issue.

allprojects {
    repositories {
        maven { url 'https://maven.google.com' } // <--- This needs to be before jcenter().
        jcenter()
    }
}

Here is my application files and configuration.

  • React native version 0.55
  • React native fbsdk version 0.7.0
  • Wix react native navigation version 1.1.458
  • Platform Android

My MainApplication.java

import android.app.Application;
import com.facebook.FacebookSdk;
import com.facebook.CallbackManager;
import com.facebook.appevents.AppEventsLogger;
import com.facebook.react.ReactApplication;
import com.facebook.reactnative.androidsdk.FBSDKPackage;
import co.apptailor.googlesignin.RNGoogleSigninPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;

import java.util.Arrays;
import java.util.List;

import com.reactnativenavigation.NavigationApplication;

public class MainApplication extends NavigationApplication  {

         private static CallbackManager mCallbackManager = CallbackManager.Factory.create();

          protected static CallbackManager getCallbackManager() {
            return mCallbackManager;
          }

       @Override
       public boolean isDebug() {
           // Make sure you are using BuildConfig from your own application
           return BuildConfig.DEBUG;
       }

       protected List<ReactPackage> getPackages() {
           return Arrays.<ReactPackage>asList(
               // eg. new VectorIconsPackage()
                 new VectorIconsPackage(),
                 new FBSDKPackage(mCallbackManager)
           );
       }

       @Override
       public List<ReactPackage> createAdditionalReactPackages() {
           return getPackages();
       }

       @Override
       public String getJSMainModuleName() {
           return "index";
       }


}

Mainactivity.java

import android.content.Intent;

import com.reactnativenavigation.controllers.SplashActivity;

public class MainActivity extends SplashActivity {
        @Override
        public void onActivityResult(int requestCode, int resultCode, Intent data) {
            super.onActivityResult(requestCode, resultCode, data);
            MainApplication.getCallbackManager().onActivityResult(requestCode, resultCode, data);
        }
}

I tried to follow few other threads from github/wix/react-native-navigation , react native github and stackover flow , but no luck in fixing this issue

user7747472
  • 1,874
  • 6
  • 36
  • 80

0 Answers0