Replies: 2 comments
-
这是项目的package.json文件 |
Beta Was this translation helpful? Give feedback.
-
RN 开发容易遇到各种环境问题,建议仔细阅读报错信息,使用关键词进行 Google 或 GPT 查询,这样能解决大部分问题。
|
Beta Was this translation helpful? Give feedback.
-
这是项目的package.json文件 |
Beta Was this translation helpful? Give feedback.
-
RN 开发容易遇到各种环境问题,建议仔细阅读报错信息,使用关键词进行 Google 或 GPT 查询,这样能解决大部分问题。
|
Beta Was this translation helpful? Give feedback.
-
我按照该文档
https://taro.redwoodjs.cn/docs/react-native#%E7%AE%80%E4%BB%8B
创建了一个taro+react native模版项目,
该项目执行yarn dev:rn, yarn:dev:h5, yarn dev:weapp 都成功
然后我接下来想执行 yarn android 一直都是失败状态
(
我尝试了以下
使用android studio 创建了一个 android studio 工程项目, 安卓手机使用USB数据线连接电脑, 点击run按钮,会自动安装软件到手机上
创建react native项目,JDK版本为17,安卓手机使用USB数据线连接电脑,执行yarn android,也能成功自动安装软件到手机上
但是,taro+react native模版项目
)
以下是vscode编辑器的报错:
`
PS E:\textCode\myApp> yarn android
yarn run v1.22.21
$ react-native run-android
info Starting JS server...
info Installing the app...
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
5 actionable tasks: 5 executed
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where:
Script 'E:\textCode\myApp\node_modules\expo-modules-autolinking\scripts\android\autolinking_implementation.gradle' line: 272
What went wrong:
A problem occurred evaluating project ':expo'.
2: Task failed with an exception.
A problem occurred configuring project ':expo'.
BUILD FAILED in 56s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where:
Script 'E:\textCode\myApp\node_modules\expo-modules-autolinking\scripts\android\autolinking_implementation.gradle' line: 272
What went wrong:
A problem occurred evaluating project ':expo'.
2: Task failed with an exception.
A problem occurred configuring project ':expo'.
BUILD FAILED in 56s
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
`
Beta Was this translation helpful? Give feedback.
All reactions