Skip to content

Manually Link Package

wkh237 edited this page Sep 7, 2016 · 7 revisions

Android

Open android/app/build.gradle, add this line

dependencies {
    ...
+    compile project(':react-native-fetch-blob')                                                                      
}

Open android/settings.gradle, and add these lines which will add RNFetchBlob Android project dependency to your app.

include ':app'      
+ include ':react-native-fetch-blob'                                                                                                  
+ project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fetch-blob/android')                        

Add these lines to MainApplication.java, so that RNFetchBlob package becomes part of react native package.

...
+ import com.RNFetchBlob.RNFetchBlobPackage;                                                                                 
...
protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
+          new RNFetchBlobPackage()                                                                                         
      );
    }
  };
...

If you still having problem on installing this package, please check the trouble shooting page or file an issue

IOS

Clone this wiki locally