我试图将 react-native-ble-manager 安装到我的本机(Android专注)应用程序中 .

npm install --save react-native-ble-manager 并运行 react-native link 之后,我得到输出告诉我有一个成功的链接按预期 .

但是当我去构建( react-native run-android --port=5714 )时,构建失败并出现以下错误:

出了什么问题:配置项目':app'时出现问题 . 无法解析配置':app:_debugApk'的所有依赖项 . 配置项目':react-native-ble-manager'时出现问题 . 无法解析配置':react-native-ble-manager:classpath'的所有依赖项 . 无法解析com.android.tools.build:gradle:1.5.0 . 要求:direct_analytics:react-native-ble-manager:unspecified无法解析com.android.tools.build:gradle:1.5.0 . 无法获得资源'https://jcenter.bintray.com/com/android/tools/build/gradle/1.5.0/gradle-1.5.0.pom' . 无法获取'https://jcenter.bintray.com/com/android/tools/build/gradle/1.5.0/gradle-1.5.0.pom' . 连接到jcenter.bintray.com:443 [jcenter.bintray.com/159.122.18.156]失败:连接超时:连接

我完全是'm relatively new to react native, so during setup I followed Facebook' s "Building Projects with Native Code" instructions(对于windows / android) . 我应该提一下,我为模拟器做了设置,但我目前正在使用物理设备 . 为了设置物理设备,我手动下载并安装Google's USB Driver

安装时我跟着 react-native-ble-managerinstructions . 需要注意的是我的 minSdkVersion 原来是16 .

在此之前被标记为重复,我've been searching on SO and GitHub for the past two days finding no answer. Could this be because I' m在代理后面? Connection timed out 让我相信如此 . 我已经将npm / node配置为在一个后面工作,但是gradle需要吗?在我尝试添加 react-native-ble-manager 之前,应用程序构建,编译和运行 .

以下是我的环境信息的屏幕截图:
environment information

另外: react-native-cli: 2.0.1 .

更新:我什么也没做,只是重复运行 react-native run-android --port=5714 每次都得到不同的错误,直到构建成功并且应用程序部署到Android设备 . 这令人沮丧地不稳定 .