vwpo / react-native-whatsapp-stickers-share

Share Whatsapp stickerpacks with React-Native
1 stars 12 forks source link

Caused by: java.lang.ExceptionInInitializerError (Android) #9

Open Haseeba393 opened 3 years ago

Haseeba393 commented 3 years ago

Introduction I have installed this library and followed the instructions as given in Readme. I'm opening the project in Android Studio to build and run the project on Emulator but an error comes which is: image

Also both commands: npx react-native run-ios and npx react-native run-android are not working. But iOS project is running from xcode successfully. Same I'm trying to open the project in Android but gradle build is going to failed due to above error. Please helpe me out. Thank you

Package.json

{ "name": "wastickers", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "@react-native-community/masked-view": "^0.1.10", "@react-navigation/native": "^5.9.3", "@react-navigation/stack": "^5.14.3", "react": "16.13.1", "react-native": "0.63.4", "react-native-bootsplash": "^3.2.0", "react-native-gesture-handler": "^1.10.3", "react-native-reanimated": "^2.0.1", "react-native-safe-area-context": "^3.2.0", "react-native-screens": "^2.18.1" }, "devDependencies": { "@babel/core": "^7.13.10", "@babel/runtime": "^7.13.10", "@react-native-community/eslint-config": "^2.0.0", "babel-jest": "^26.6.3", "eslint": "^7.22.0", "jest": "^26.6.3", "metro-react-native-babel-preset": "^0.65.2", "react-native-whatsapp-stickers-share": "^1.4.2", "react-test-renderer": "16.13.1" }, "jest": { "preset": "react-native" } }

Haseeba393 commented 3 years ago

Also I added these lines in Podfile but ios build was also failed.

pod 'react-native-whatsapp-stickers-share', :podspec => '../node_modules/react-native-whatsapp-stickers-share/react-native-whatsapp-stickers-share.podspec' pod 'YYImage' pod 'YYImage/WebP'

I corrected this error by changing a little thing in it which is pod 'react-native-whatsapp-stickers-share', :path => '../node_modules/react-native-whatsapp-stickers-share' pod 'YYImage' pod 'YYImage/WebP'

After doing these changes in first line, my iOS project is building successfully through ONLY Xcode but not from terminal.

Please let me know if you can do anything regarding this. Thank you

Haseeba393 commented 3 years ago

is there anyone here to help me out? I have tried a lot of ways but nothing is working for me. Kindly help me out