0
votes

so, I was working on a react-native app. When i tried to add react-native-navigation using the provided documentations about it, this is the error i'm getting, have tried all the solutions already available, but not working for me.

thanks in advance!

Task :expo-constants:compileDebugJavaWithJavac FAILED E:\react native\rn-course\node_modules\expo-constants\android\src\main\java\expo\modules\constants\ConstantsService.java:142: error: cannot find symbol return info.getLongVersionCode(); ^ symbol: method getLongVersionCode() location: variable info of type PackageInfo 1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':expo-constants:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 35s
340 actionable tasks: 335 executed, 5 up-to-date
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
2
Hello, could you edit your question to include a little more context? (I have no idea what it's actually about but I imagine something along the lines of what code you were trying to run, or what you were trying to do/install) - Izaak van Dongen
thanks. edited but if any code is required i can provide thanks again. - Aakash Hussain Shah

2 Answers

2
votes

First try npm i jetifier or yarn add jetifier and then npx jetify. Hope it helps

0
votes

Delete node_modules/expo-constants/and build folder