Giter Club home page Giter Club logo

Comments (7)

wonday avatar wonday commented on July 1, 2024 9

Hi

May be some setting is wrong/non-standard in your android project.

You can manual add the config.

  1. install modules
    npm install react-native-pdf --save
    npm install react-native-fetch-blob --save

  2. add the following code to MainApplication.java

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
            new RNFetchBlobPackage(),  //add this
            new RCTPdfView()           //add this
      );
    }
  };
  1. add the following code to android/setting.gradle
include ':react-native-pdf'
project(':react-native-pdf').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-pdf/android')
include ':react-native-fetch-blob'
project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fetch-blob/android')
  1. add the following code to android/app/build.gradle
dependencies {
    compile project(':react-native-pdf')        //add this
    compile project(':react-native-fetch-blob') //add this
}

for detail, you can init a new project and diff with my example project.
Hope this can help you. :-)

from react-native-pdf.

Noitidart avatar Noitidart commented on July 1, 2024 1

react-native link failed for me in RN 0.54, these instructions helped a lot!

from react-native-pdf.

johntom avatar johntom commented on July 1, 2024

Thanks so much for your assistance as a deeper dive indeed fixed the issues.

from react-native-pdf.

kusakusakusa avatar kusakusakusa commented on July 1, 2024

With reference to issue #2, react-native-fetch-blob has been renamed to rn-fetch-blob since rn-fetch-blob v0.10.9 on June 24th.

from react-native-pdf.

hophoppoppop avatar hophoppoppop commented on July 1, 2024

Is there any manual Installation for IOS?

from react-native-pdf.

kusakusakusa avatar kusakusakusa commented on July 1, 2024

react-native link works fine for iOS for me. I will probably use git diff to see the changes in the files to figure out the what react-native link did to manually install it.

from react-native-pdf.

robzedgames avatar robzedgames commented on July 1, 2024

Note that react-native-fetch-blob has been renamed to rn-fetch-blob (the README mentions it by the updated name) so you will want to ensure that your settings.gradle and app/build.gradle refer to rn-fetch-blob instead.

from react-native-pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.