虾仁A 2022-03-29 12:40 采纳率: 78.8%
浏览 58
已结题

React Native 跑夜神模拟器,Android Studio,Genymotion 全部失败

问题遇到的现象和发生背景

React Native 跑夜神模拟器,Android Studio,Genymotion 全部失败
已经弄了3天了,求各位指教

yarn run v1.22.18
warning ..\package.json: No license field
$ D:\vscode\React-Native\My\node_modules\.bin\react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 863 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...
Configuration on demand is an incubating feature.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'My'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:4.2.2.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:4.2.2.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'. Received status code 400 from server: Bad Request
      > Could not resolve com.android.tools.build:gradle:4.2.2.
         > Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'.
            > Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'. Received status code 400 from server: Bad Request   

* 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 5s

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 failed with an exception.
    at makeError (D:\vscode\React-Native\My\node_modules\execa\index.js:174:9)
    at D:\vscode\React-Native\My\node_modules\execa\index.js:278:16
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async runOnAllDevices (D:\vscode\React-Native\My\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (D:\vscode\React-Native\My\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.

问题相关代码,请勿粘贴截图
运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果

展开全部

  • 写回答

1条回答 默认 最新

  • 不会写代码的猴子 Android领域优质创作者 2022-03-29 13:02
    关注

    你这是build.gradle同步失败了。
    应该是网络有问题

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

问题事件

  • 系统已结题 4月6日
  • 已采纳回答 3月30日
  • 创建了问题 3月29日

悬赏问题

  • ¥15 MATLAB代码补全插值
  • ¥15 Typegoose 中如何使用 arrayFilters 筛选并更新深度嵌套的子文档数组信息
  • ¥15 前后端分离的学习疑问?
  • ¥15 stata实证代码答疑
  • ¥50 husky+jaco2实现在gazebo与rviz中联合仿真
  • ¥15 dpabi预处理报错:Error using y_ExtractROISignal (line 251)
  • ¥15 在虚拟机中配置flume,无法将slave1节点的文件采集到master节点中
  • ¥15 husky+kinova jaco2 仿真
  • ¥15 zigbee终端设备入网失败
  • ¥15 金融监管系统怎么对7+4机构进行监管的
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部