首页 > 解决方案 > React Native 版本 0.59.8 中的编译错误 - 分析和推送工具包

问题描述

谁能告诉我如何解决这些编译错误。在 React Native 中集成 Analytics 和 Push Kit 时遇到这些问题?

Could not determine the dependencies of task ':app:preDebugBuild'.

无法解析配置 ':app:debugCompileClasspath' 的所有任务依赖项。无法解析 org.codehaus.mojo:animal-sniffer-annotations:1.17。要求:项目:app > 无法解析 org.codehaus.mojo:animal-sniffer-annotations:1.17。> 无法获取资源“http://developer.huawei.com/repo/org/codehaus/mojo/animal-sniffer-annotations/1.17/animal-sniffer-annotations-1.17.jar”。> 无法 HEAD 'http://developer.huawei.com/repo/org/codehaus/mojo/animal-sniffer-annotations/1.17/animal-sniffer-annotations-1.17.jar'。> 读取超时无法解析 org.codehaus.mojo:animal-sniffer-annotations:1.17。要求:项目:app > io.grpc:grpc-core:1.16.1 > 无法解析 org.codehaus.mojo:animal-sniffer-annotations:1.17。> 无法获取资源'http://developer.huawei. com/repo/org/codehaus/mojo/animal-sniffer-annotations/1.17/animal-sniffer-annotations-1.17.jar'。> 无法 HEAD 'http://developer.huawei.com/repo/org/codehaus/mojo/animal-sniffer-annotations/1.17/animal-sniffer-annotations-1.17.jar'。> 读取超时

  > Could not resolve com.parse.bolts:bolts-applinks:1.4.0.
     > Could not get resource 'http://developer.huawei.com/repo/com/parse/bolts/bolts-applinks/1.4.0/bolts-applinks-1.4.0.jar'.
        > Could not HEAD 'http://developer.huawei.com/repo/com/parse/bolts/bolts-applinks/1.4.0/bolts-applinks-1.4.0.jar'.
           > Read timed out

标签: huawei-mobile-serviceshuawei-developers

解决方案


此问题可能有以下原因

集成问题 链接问题

对于集成问题,请确保遵循以下指南中提供的所有集成步骤。

https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/integrate-rn-sdk-0000001050159021

对于喜欢的问题,我建议您使用 npm link 命令并尝试这将帮助您链接节点模块。


推荐阅读