[英]Getting error when try to run android react-native project
When i want to run react-native run-android command i see当我想运行 react-native run-android 命令时,我看到
info Running jetifier to migrate libraries to AndroidX. info 运行 jetifier 将库迁移到 AndroidX。 You can disable it using "--no-jetifier" flag.
您可以使用“--no-jetifier”标志禁用它。 Jetifier found 998 file(s) to forward-jetify.
Jetifier 找到了 998 个要转发 Jetify 的文件。 Using 12 workers... info JS server already running.
使用 12 个工人...信息 JS 服务器已经在运行。 info Installing the app...
信息 安装应用程序...
FAILURE: Build failed with an exception. FAILURE:构建失败,出现异常。
Where: Build file 'C:\\tmpProjets\\beetv-app\\node_modules\\react-native-reanimated\\android\\build.gradle' line: 58其中:构建文件 'C:\\tmpProjets\\beetv-app\\node_modules\\react-native-reanimated\\android\\build.gradle' 行:58
What went wrong: A problem occurred configuring project ':react-native-reanimated'.出了什么问题:配置项目“:react-native-reanimated”时出现问题。
Cp65001
cp65001
Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output.
使用 --info 或 --debug 选项运行以获得更多日志输出。 Run with --scan to get full insights.
使用 --scan 运行以获得完整的见解。
Get more help at https://help.gradle.org在https://help.gradle.org获取更多帮助
BUILD FAILED in 8s 8 秒内构建失败
error Failed to install the app.错误 无法安装应用程序。 Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment .
确保您已设置 Android 开发环境: https : //facebook.github.io/react-native/docs/getting-started.html#android-development-environment 。 Run CLI with --verbose flag for more details.
使用 --verbose 标志运行 CLI 以获取更多详细信息。 Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
错误:命令失败:gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception. FAILURE:构建失败,出现异常。
Where: Build file 'C:\\tmpProjets\\beetv-app\\node_modules\\react-native-reanimated\\android\\build.gradle' line: 58其中:构建文件 'C:\\tmpProjets\\beetv-app\\node_modules\\react-native-reanimated\\android\\build.gradle' 行:58
What went wrong: A problem occurred configuring project ':react-native-reanimated'.出了什么问题:配置项目“:react-native-reanimated”时出现问题。
Cp65001
cp65001
Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output.
使用 --info 或 --debug 选项运行以获得更多日志输出。 Run with --scan to get full insights.
使用 --scan 运行以获得完整的见解。
Get more help at https://help.gradle.org在https://help.gradle.org获取更多帮助
BUILD FAILED in 8s 8 秒内构建失败
at checkExecSyncError (child_process.js:611:11)
at execFileSync (child_process.js:629:15)
at runOnAllDevices (C:\tmpProjets\beetv-app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at buildAndRun (C:\tmpProjets\beetv-app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:179:41)
at C:\tmpProjets\beetv-app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:133:12
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Command.handleAction (C:\tmpProjets\beetv-app\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:182:9)
npm ERR! npm 错误! code ELIFECYCLE npm ERR!
代码 ELIFECYCLE npm ERR! errno 1 npm ERR!
错误号 1 npm 错误号! BeeTVApp@0.0.1 android:
react-native run-android
npm ERR! BeeTVApp@0.0.1 android:
react-native run-android
npm ERR! Exit status 1 npm ERR!退出状态 1 npm ERR! npm ERR!
npm 错误! Failed at the BeeTVApp@0.0.1 android script.
在 BeeTVApp@0.0.1 android 脚本上失败。 npm ERR!
npm 错误! This is probably not a problem with npm.
这可能不是 npm 的问题。 There is likely additional logging output above.
上面可能有额外的日志输出。
npm ERR!
npm 错误! A complete log of this run can be found in: npm ERR!
可以在以下位置找到此运行的完整日志:npm ERR!
C:\\Users\\Blerr\\AppData\\Roaming\\npm-cache_logs\\2020-03-19T10_46_33_609Z-debug.logC:\\Users\\Blerr\\AppData\\Roaming\\npm-cache_logs\\2020-03-19T10_46_33_609Z-debug.log
从项目路径npx jetify
运行此命令并检查
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.