Coder Social home page Coder Social logo

react-native-share-pdf's People

Contributors

dependabot[bot] avatar jpr-longgame avatar kirankalyan5 avatar madeinfrance avatar mateosilguero avatar snyk-bot avatar spbriggs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-native-share-pdf's Issues

NPM version out of date

Describe the bug
The version in the NPM repository is behind this version. I've had to manually copy some of the latest commits into my yarn-installed version to get it to compile

To Reproduce

yarn add react-native-share-pdf
Observe that the installed version doesn't have this commit for example b6df0d9

Expected behavior
NPM installs the latest version

Unable to find a matching configuration of project :react-native-share-pdf

Describe the bug

Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve project :react-native-share-pdf.
     Required by:
         project :app
      > Unable to find a matching configuration of project :react-native-share-pdf:
          - None of the consumable configurations have attributes.

To Reproduce

  • I checked the demo project and cannot reproduce the issue
  • I checked the demo project and the issue exists

Neither - the demo project does not run.

Steps to reproduce the behavior:

  1. Create a new project.
  2. Follow the installation instructions for android (including yarn add react-native-share-pdf)

dependencies in app/build.gradle:

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation project(':react-native-share-pdf')
}

settings.gradle

rootProject.name = 'SharePDFTester'

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

in MainApplication.java

@Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
          new ShareFilePackage()
      );
    }

Build Failing on Android

Hi! ๐Ÿ‘‹

Firstly, thanks for your work on this project! ๐Ÿ™‚

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-share-pdf/android/src/main/java/com/maximegerbe/reactnative/sharefile/ShareFile.java b/node_modules/react-native-share-pdf/android/src/main/java/com/maximegerbe/reactnative/sharefile/ShareFile.java
index 8667de9..520fc6e 100644
--- a/node_modules/react-native-share-pdf/android/src/main/java/com/maximegerbe/reactnative/sharefile/ShareFile.java
+++ b/node_modules/react-native-share-pdf/android/src/main/java/com/maximegerbe/reactnative/sharefile/ShareFile.java
@@ -8,7 +8,7 @@ package com.maximegerbe.reactnative.sharefile;
 
 import android.content.Intent;
 import android.net.Uri;
-import android.support.v4.content.FileProvider;
+import androidx.core.content.FileProvider;
 import android.util.Base64;
 import android.app.Activity;
 

This issue body was partially generated by patch-package.

package android.support.v4.content does not exist

Describe the bug
I just installed this package and get this error:
Uri outputFileUri = FileProvider.getUriForFile(reactContext, reactContext.getPackageName() + ".provider", file);
^
symbol: variable FileProvider
location: class ShareFile

Info

"react": "16.13.1",
"react-native": "0.63.4",
"react-native-share-pdf": "^0.0.6",

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.