react-native. 0.56 Android build error
See original GitHub issuereact-native init reactnew
and then react-native run-android
causes this error:
`FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring root project ‘newreact’.
Could not resolve all dependencies for configuration ‘:classpath’. > Could not resolve com.android.tools.build:gradle:2.3.3. Required by: project : Could not resolve com.android.tools.build:gradle:2.3.3. Could not get resource ‘https://maven.google.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom’. Could not GET ‘https://maven.google.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom’. maven.google.com:443 failed to respond Could not resolve com.android.tools.build:gradle:2.3.3. Could not get resource ‘https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom’. Could not GET ‘https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom’. jcenter.bintray.com:443 failed to respond`
build.gradle:
`// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() maven { url ‘https://maven.google.com/’ name ‘Google’ } } dependencies { classpath ‘com.android.tools.build:gradle:2.3.3’
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects { repositories { mavenLocal() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url “$rootDir/…/node_modules/react-native/android” } maven { url ‘https://maven.google.com/’ name ‘Google’ } } }
ext { buildToolsVersion = “26.0.3” minSdkVersion = 16 compileSdkVersion = 26 targetSdkVersion = 26 supportLibVersion = “26.1.0” }`
package.json:
{ "name": "newreact", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest" }, "dependencies": { "react": "16.4.1", "react-native": "0.56.0" }, "devDependencies": { "babel-jest": "23.4.0", "babel-preset-react-native": "5", "jest": "23.4.0", "react-test-renderer": "16.4.1" }, "jest": { "preset": "react-native" } }
React Native Environment Info: System: OS: Windows 10 CPU: x64 Intel® Core™ i7-7500U CPU @ 2.70GHz Memory: 2.65 GB / 7.88 GB Binaries: Yarn: 1.7.0 - C:\Users\khani\AppData\Roaming\npm\yarn.CMD npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
I got different errors:
Unable to resolve module
AccessibilityInfo
fromC:\Users\Simon\programs\my2app\node_modules\react-native\Libraries\react-native\react-native-implementation.js
: ModuleAccessibilityInfo
does not exist in the Haste module mapI do the research and cannot find any relative information which can help
React Native Environment Info: System: OS: Windows 10 CPU: x64 Intel® Core™ i5-7200U CPU @ 2.50GHz Memory: 1.79 GB / 7.91 GB Binaries: Yarn: 1.7.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.1.0 - C:\Program Files\nodejs\npm.CMD
same here. 😔