Reputation: 465
I'd like to ask about the following error. So I've been developing a small BLE app a year ago and successfully managed to implement it. I did not push it to the Google Play store but instead installed it somehow on the Android via usb.
However, now I need to get it back up and running but am facing a plethora of errors.
PS C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard> npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1302 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...
> Configure project :app
Installing unimodules:
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\@unimodules\core
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\@unimodules\react-native-adapter
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\expo-app-loader-provider
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\expo-constants
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\expo-error-recovery
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\expo-file-system
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\expo-font
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\expo-keep-awake
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\expo-linear-gradient
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\expo-location
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\expo-permissions
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\expo-sqlite
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\expo-web-browser
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\unimodules-barcode-scanner-interface
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\unimodules-camera-interface
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\unimodules-constants-interface
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\unimodules-face-detector-interface
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\unimodules-file-system-interface
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\unimodules-font-interface
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\unimodules-image-loader-interface
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\unimodules-permissions-interface
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\unimodules-sensors-interface
[email protected] from C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard\node_modules\unimodules-task-manager-interface
The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.
This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins { ... }' DSL if they specify explicit versions, even if the versions are equal.
Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects.
If the parent project does not need the plugin, add 'apply false' to the plugin line.
See: https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl
The Kotlin plugin was loaded in the following projects: ':expo-error-recovery', ':expo-permissions'
> Task :@react-native-community_async-storage:compileDebugJavaWithJavac FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.2/userguide/command_line_interface.html#sec:command_line_warnings
10 actionable tasks: 1 executed, 9 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 C:\Program Files (x86)\Java\jre1.8.0_251 contains a valid JDK installation.
* 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 31s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
PS C:\Users\stefanec\Desktop\SOC\i_garden\i_garden\iGard>
Upvotes: 0
Views: 390
Reputation: 4332
Looks like you don't have JDK installed.
Use the command below to install it with brew if you're on a Mac or follow the docs to how to install on your specific machine
brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
Follow this guide to install on windows
See docs https://reactnative.dev/docs/_getting-started-macos-android#installing-dependencies
Upvotes: 2