import undefined.RNPDFPackage error
What react-native version are you using?
"react-native": "0.68.3",
What react-native-pdf version are you using?
"react-native-pdf": "6.7.2",
What platform does your issue occur on? (android/ios/both)
android
Describe your issue as precisely as possible :
- Steps to reproduce the issue or to explain in which case you get the issue
- Interesting
logs
Join a screenshot or video of the problem on the simulator or device?
Show us the code you are using?
"react-native": "0.67.5" "react-native-pdf": "^6.7.2"
1 - Running project;
BUILD FAILED in 22s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
mymac/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:73: error: package undefined does not exist
import undefined.RNPDFPackage;
^
mymac/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:172: error: cannot find symbol
new RNPDFPackage(),
^
symbol: class RNPDFPackage
location: class PackageList
Note: mymac/android/app/src/debug/java/com/icoop/ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
hello it works for me what i did:
- first i clean the previous build and remove the node_modules directory and install again.
- run the react-native link react-native-pdf
- now in build folder you will found import com.wonday.pdf.RNPDFPackage instead of import com.undefined.RNPDFPackage;
now it will work fine. thanks
@Princejain21 Its not working for me
Not working for me as well.
whats the solution?