1

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) Commented Jan 15, 2020 at 14:17
  • thanks. edited but if any code is required i can provide thanks again. Commented Jan 16, 2020 at 10:39

2 Answers 2

4

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

Sign up to request clarification or add additional context in comments.

2 Comments

thank you. now I'm getting this error Execution failed for task ':app:processDebugResources'. > Failed to execute aapt
i have posted the new error as new question kindly checkout stackoverflow.com/q/59768657/12717682
0

Delete node_modules/expo-constants/and build folder

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.