HeligPfleigh / react-native-thermal-receipt-printer

A RN library for thermal printer
166 stars 103 forks source link

TypeError: Cannot read property 'init' of undefined #13

Open lehuydev2203 opened 4 years ago

lehuydev2203 commented 4 years ago

I have issue on Android in my project.|

Screen Shot 2020-08-19 at 11 43 48

if I create new project . i can run it, but when i install to my app . I have issue in function init??

System: OS: macOS 10.15.6 CPU: (4) x64 Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz Memory: 867.95 MB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 14.7.0 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.7 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 Android SDK: API Levels: 23, 25, 27, 28, 29, 30 Build Tools: 26.0.3, 27.0.3, 28.0.3, 29.0.2, 29.0.3, 30.0.1 System Images: android-29 | Google Play Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 4.0.1 4.0.1 Xcode: 11.5/11E608c - /usr/bin/xcodebuild Languages: Java: 1.8.0_265 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.0 => 0.63.0 npmGlobalPackages: react-native: Not Found

HeligPfleigh commented 4 years ago

I can't reproduce it my own, which module you used, Net, USB or BLE printer? And could you provide the logcat also, for that error?

hasithaWalpola commented 3 years ago

I also got the same error

BritoMatheus commented 3 years ago

I solve it doing: image

Add:

in: AndroidManifest.xml

Akshh057 commented 2 years ago

if you are using it on emulator, this issue will arise, try to test it on physical device