Skip to content

installation #24

Closed
Closed

Description

@johntom

Hi.
While I have no problems with IOS with the exact setup I've tried to install on a few windows 10 comptuters with RN 0.41 and get the following error
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\React\nsp\NSPV6\NativeStarterPro-v6.0.0>npm install react-native-pdf --save
react-native-pdf@1.2.4 node_modules\react-native-pdf
├── crypto-js@3.1.9-1
└── react-native-fetch-blob@0.10.6 (glob@7.1.2)

C:\React\nsp\NSPV6\NativeStarterPro-v6.0.0>react-native link react-native-pdf
rnpm-install info Linking react-native-pdf android dependency
rnpm-install ERR! It seems something went wrong while linking. Error: ENOENT: no such file or directory, open 'C:\React\nsp\NSPV6\NativeStarterPro-v6.0.0\android\app\src\main\java\android\support\v7\appcompat\MainApplication.java'
Please file an issue here: https://github.com/facebook/react-native/issues

ENOENT: no such file or directory, open 'C:\React\nsp\NSPV6\NativeStarterPro-v6.0.0\android\app\src\main\java\android\support\v7\appcompat\MainApplication.java'

I have no problem installing and running your eample on the same win 10 computers, a bit lost.

John

Activity

  1. wonday commented on Jul 21, 2017

    @wonday
    Owner

    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. :-)

  2. johntom commented on Jul 23, 2017

    @johntom
    Author

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

  3. Noitidart commented on Mar 4, 2018

    @Noitidart

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

  4. kusakusakusa commented on Sep 27, 2018

    @kusakusakusa

    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.

  5. hophoppoppop commented on Oct 2, 2018

    @hophoppoppop

    Is there any manual Installation for IOS?

  6. kusakusakusa commented on Oct 3, 2018

    @kusakusakusa

    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.

  7. robzedgames commented on Sep 5, 2019

    @robzedgames

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions