wonday / react-native-pdf

A <Pdf /> component for react-native
MIT License
1.6k stars 557 forks source link

build failed in android #883

Open yellhtetaung opened 1 week ago

yellhtetaung commented 1 week ago

Hi! πŸ‘‹

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

Today I used patch-package to patch react-native-pdf@6.1.2 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-pdf/android/build.gradle b/node_modules/react-native-pdf/android/build.gradle
index a4d42a0..f5f3c6b 100644
--- a/node_modules/react-native-pdf/android/build.gradle
+++ b/node_modules/react-native-pdf/android/build.gradle
@@ -52,6 +52,7 @@ android {

 dependencies {
     implementation "com.facebook.react:react-native:${_reactNativeVersion}"
-    implementation 'com.github.barteksc:android-pdf-viewer:3.1.0-beta.1'
+    // implementation 'com.github.barteksc:android-pdf-viewer:3.1.0-beta.1'
+    implementation 'com.github.mhiew:android-pdf-viewer:3.2.0-beta.1'
     implementation 'com.google.code.gson:gson:2.8.5'
 }

This issue body was partially generated by patch-package.