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

Failed to notify project evaluation listener. #17730

Closed
thidasapankaja opened this issue Jan 25, 2018 · 5 comments
Closed

Failed to notify project evaluation listener. #17730

thidasapankaja opened this issue Jan 25, 2018 · 5 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@thidasapankaja
Copy link

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: Linux 4.13
Node: 9.4.0
Yarn: Not Found
npm: 4.6.1
Watchman: Not Found
Xcode: N/A
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.52.0 => 0.52.0

Target Platform: Ubuntu 17.10

Steps to Reproduce

  1. Followed official docs and started react project using react-native init
  2. And tried to run the project on an Android device by react-native run-android
  3. Got an error and fixed it by uninstalling Java 9 and installing JDK 8.
  4. Then again tried to run the project by react-native run-android

Expected Behavior

Start the project and run the app on the connected device which is an adb recognized and configured device.

Actual Behavior


Scanning folders for symlinks in /home/pankaja/Documents/Projects/react-native/AwesomeProject/node_modules (10ms)
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...

> Configure project :app 
The CompileOptions.bootClasspath property has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the CompileOptions.bootstrapClasspath property instead.


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
   > com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V

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

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

BUILD FAILED in 1s
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/android-setup.html

Reproducible Demo

  1. Followed official docs and started react project using react-native init
  2. And tried to run the project on an Android device by react-native run-android
  3. Got the error

followed this official react-native docs

@ThHareau
Copy link

Have you seen this? expo/create-react-native-app#478

@thidasapankaja
Copy link
Author

@ThHareau Yes. I followed that and installed JDK8 and set it as the default JDK. But I got the same error. Then I searched Stackoverflow and followed this as it says the error is because of 2 JDKs installed in the machine, I removed JDK9. But still I'm getting the error.

@ThHareau
Copy link

It worked for me, I can really help you more :S

@thidasapankaja
Copy link
Author

Thanks @ThHareau then I think it's with JDK 9. I just removed JDK 9 using sudo rm -rf jdk-9 which was in my /usr/lib/jvm folder and I've already set jdk 8 as the default jdk by following previously mentioned issue. Still I'm getting the error.

@thidasapankaja
Copy link
Author

Fixed by completely removing both JDKs and reinstalling JDK 8

@facebook facebook locked as resolved and limited conversation to collaborators Jan 26, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jan 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants