I'm trying to run react-native run-android but I continuously get this error.I am running on emulator . I started the app using react-native init
.
PS: I am running on proxy.
When I am trying to run
react-native run-android
I get:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'AwesomeProject'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:2.2.3.
Required by:
:AwesomeProject:unspecified
> Could not resolve com.android.tools.build:gradle:2.2.3.
> Could not get resource 'https://jcenter.bintray.com/com/android/tool
/build/gradle/2.2.3/gradle-2.2.3.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/buil
/gradle/2.2.3/gradle-2.2.3.pom'. Received status code 407 from server:
Proxy Authentication Required
When I am trying to run
directly in Android Studio
I get:
Error:Could not GET
'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-
2.2.3.pom'. Received status code 407 from server: Proxy Authentication
Required
<a href="toggle.offline.mode">Enable Gradle 'offline mode' and sync
project</a>
I have my node_modules installed and I'm not sure what else to try, I've been googling for the last 4 hours and have come up with nothing.
set your proxy details Inside sdk manager
AndroidStudio->tools->Android->SDKManager->system settings->Http Proxy
your problem is not related to npm and node. you have some gradle problems.check if you can access the URL from browser?
https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle- 2.2.3.pom
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With