when I want to run my react-native project I get this error. It was in github and before I cloned it it was working.
Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not resolve com.facebook.react:react-native: .
Required by:
project :app
project :app > project :react-native-vector-icons
project :app > project :react-native-async-storage_async-storage
project :app > project :react-native-community_checkbox
project :app > project :react-native-community_geolocation
project :app > project :react-native-community_masked-view
project :app > project :react-native-community_slider
project :app > project :react-native-geocoder
project :app > project :react-native-gesture-handler
project :app > project :react-native-maps
project :app > project :react-native-reanimated
project :app > project :react-native-safe-area-context
project :app > project :react-native-screens
project :app > project :react-native-svg
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
> Could not HEAD 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
CodePudding user response:
First, type the following address in your browser, https://firebase.google.com and if you get a 403 error, it means that the IPs of your place of residence are blocked . There are several things you can do to solve this problem:
- Uninstall Chrome browser from your system because they use it for location
- Use a valid VPN Or VPS, preferably from Germany, France or the United States
- Change your system clock to the clock of the country to which your IP has changed
CodePudding user response:
Bin tray is experiencing some issues on their download network :
Also if you are using obselete jCenter(), then replace it with mavenCentral() in your android/build.gradle
