【问题标题】:Cant run react-native app with run-android on emulator无法在模拟器上使用 run-android 运行 react-native 应用程序
【发布时间】:2021-05-07 19:03:25
【问题描述】:

所以我试图在我的终端上运行 react-native,但我不断收到不同的错误,想知道发生了什么,我不断修复,然后不断出现更多错误,但我面临的最新问题是关于我的 react- native-track-player 和我使用 package.json 中的 github

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.

使用“--warning-mode all”显示个别弃用警告。 见https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings

FAILURE:构建失败并出现异常。

  • 出了什么问题: 配置项目“:react-native-track-player”时出现问题。

无法解析配置“:react-native-track-player:classpath”的所有工件。 无法解析 com.android.tools.build:gradle:3.4.2。 要求: 项目:react-native-track-player > 无法解析 com.android.tools.build:gradle:3.4.2。 > 无法获取资源“https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom”。 > 无法获取“https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom”。 > 连接到 dl.google.com:443 [dl.google.com/172.217.20.142] 失败:连接超时:连接

【问题讨论】:

    标签: react-native react-native-android


    【解决方案1】:

    dl.google.com 在某些国家/地区被屏蔽! 试试

    1) Used a proxy and defined the variables http_proxy and http_proxy on the terminal.
    
    2) Then run the "react-native run-android".
    

    【讨论】:

      【解决方案2】:

      你应该重新安装调试。

      cd android
      ./gradlew.bat installDebug
      

      然后再次运行。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2019-12-21
        • 2019-09-17
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多