wonday / react-native-pdf

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

error: cannot find symbol import com.wonday.rnpdf.RNPDFPackage; #786

Closed UNIDY2002 closed 8 months ago

UNIDY2002 commented 8 months ago

What react-native version are you using?

0.72.7

What react-native-pdf version are you using?

6.7.2

What platform does your issue occur on? (android/ios/both)

android

Describe your issue as precisely as possible : 1) Steps to reproduce the issue or to explain in which case you get the issue 2) Interesting logs

See: https://github.com/thu-info-community/thu-info-app/actions/runs/6921186685/job/18826513634?pr=503#step:8:1763

error: cannot find symbol
import com.wonday.rnpdf.RNPDFPackage;
                       ^
  symbol:   class RNPDFPackage
  location: package com.wonday.rnpdf

Show us the code you are using?

https://github.com/thu-info-community/thu-info-app/tree/renovate/react-native-pdf-6.x/apps/thu-info-app

malikzype commented 8 months ago

+1

alex2bc commented 8 months ago

Looks like https://github.com/wonday/react-native-pdf/pull/784 introduced the issue for RN <73

Hey @felipecsl, could you please take a look at what is causing the library to fail during the build process? Is it change package org.wonday.pdf to com.wonday.rnpdf? Or we should leave package as suggested here?

UNIDY2002 commented 8 months ago

FYI, react-native-blob-util encountered a similar issue https://github.com/RonRadtke/react-native-blob-util/issues/315, and was fixed by https://github.com/RonRadtke/react-native-blob-util/pull/316.

Therefore, I made a similar PR #785 in this repo to solve this issue.

habibrayhan007 commented 8 months ago

It Still Showing this error to me

What react-native version are you using?

0.72.3

What react-native-pdf version are you using?

6.7.2

What platform does your issue occur on? (android/ios/both)

android

Here is the screenshot of my command terminal that gives me error: https://ibb.co/KjL4Wcn

Fares-sghaier commented 8 months ago

i had the same issue today , anyone have a solution for this please

import com.wonday.rnpdf.RNPDFPackage;

                   ^

symbol: class RNPDFPackage

location: package com.wonday.rnpdf

wleivam commented 8 months ago

@Fares-sghaier

https://github.com/wonday/react-native-pdf/pull/785

hellogbg commented 8 months ago

same problem here. I am on: "react-native": "0.72.6", "react-native-pdf": "^6.7.2",

It worked for me when I downgraded to 6.7.1 but that is a quickfix :)

Fares-sghaier commented 8 months ago

i hope they fix it soon im stuck in the hole project for this issue

UNIDY2002 commented 8 months ago

i hope they fix it soon im stuck in the hole project for this issue

Well, you can stay on v6.7.1 for the time being if you are stuck. I believe that a hot-fix will be out soon.

Fares-sghaier commented 8 months ago

@UNIDY2002 actually im already on the "react-native-pdf": "^6.7.1", and this issue happens while im building , thats so confusing

malikzype commented 8 months ago

@Fares-sghaier Remove ^ sign and do npm install again

Fares-sghaier commented 8 months ago

@malikzype thanks a lot man!

Bhaupatil1988 commented 8 months ago

@Fares-sghaier Remove ^ sign and do npm install again

It works now with .. "react-native-pdf": "6.7.1", Thanks

wonday commented 8 months ago

Fixed at v6.7.3