Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on run app #496

Closed
uendar opened this issue Nov 23, 2020 · 8 comments
Closed

Error on run app #496

uendar opened this issue Nov 23, 2020 · 8 comments
Labels
question General question about usage

Comments

@uendar
Copy link

uendar commented Nov 23, 2020

i get this error when i run the app. I did not get it before 1 day.


> Task :react-native-community_async-storage:compileDebugJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
12 actionable tasks: 2 executed, 10 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-community_async-storage:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.

@tido64 tido64 added the question General question about usage label Nov 23, 2020
@tido64
Copy link
Member

tido64 commented Nov 23, 2020

According to the error message at the bottom, it doesn't look like you've installed JDK. Please follow the instructions at React Native to get your environment properly set up: https://reactnative.dev/docs/_getting-started-macos-android#installing-dependencies

@tido64 tido64 closed this as completed Nov 23, 2020
@andrewdazs
Copy link

Suddenly this issue started to appear two days ago. And I have the environment configured as in the documentation. @uendar did you solve it or do you have a clue about it?

@L-Yeiser
Copy link

L-Yeiser commented Dec 2, 2020

@andrewdazs see this stack overflow for an explanation

@andrewdazs
Copy link

@L-Yeiser, it worked very well. After I updated my OS it had stopped working, I didn't imagine that would be the problem. Thanks a lot :)

@arlovip
Copy link

arlovip commented Jan 4, 2021

the same issue +1

@zbigniewstefaniuk
Copy link

in my case Helped:

  • Open android folder of app in Android Studio
  • Clean project
  • Rebuild Project

@hey68you
Copy link

hey68you commented Mar 4, 2021

On MacOSX bigsur, for me the problem was really that I had 2 JDK's installed:

$ /usr/libexec/java_home -V | grep jdk

Matching Java Virtual Machines (2):
    1.8.281.09 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
    1.8.0_282 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 8" /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

React Native needs the adoptopenjdk version, so I added my ~/.bash_profile the adoptopenjdk path as the JAVA_HOME environment variable:

export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
export JAVA_HOME="/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home"

@cgfeel
Copy link

cgfeel commented Aug 18, 2021

@hey68you thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question General question about usage
Projects
None yet
Development

No branches or pull requests

8 participants