"npx react-native init client "在Android上执行时失败。找不到 tools.jar。React Native 0.62.2

系统:Windows 10 NodeJS:v13.8.0 React Native:0.62.2 Windows 10 NodeJS:v13.8.0 React Native:0.62.2 React:”16.11.0″

排版稿模板也会出现这种情况

我跑完之后 npm run android,我有这些日志。

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" 
flag.
Jetifier found 967 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Launching emulator...
info Successfully launched emulator.
info Installing the app...
> Task :app: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.0.1/userguide/command_line_interface.html#sec:command_line_warnings
14 actionable tasks: 6 executed, 8 up-to-date

error Failed to install the app. Make sure you have the Android development environment set up: 
https://reactnative.dev/docs/getting-started.html#android-development-environment. Run CLI with -- 
verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.


ERROR: Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_251 contains a valid JDK installation

解决方案:

修正了。 问题出在

ERROR: Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_251 contains a valid JDK installation

我刚刚复制了 tools.jarC:\Program Files\Java\jdk1.8.0_241\jre\lib 变成 C:\Program Files\Java\jre1.8.0_251\lib

给TA打赏
共{{data.count}}人
人已打赏
未分类

如何在CSS中对JFoenix for JavaFX Scene Builder节点和类进行风格化?

2022-9-10 6:58:46

未分类

如何避免生成多个构建文件 - angular 9 - ng构建

2022-9-10 7:09:40

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索