0
I am doing a tutorial of React-Native but while trying to run the project using the command:
npx react-native run-android
I get the following error messages:
error Failed to install the app. Make sure you have the Android Development Environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-Development-Environment. Run CLI with --verbose flag for more Details. Error: Command failed: . /gradlew app:installDebug -Preactnativedevserverport=8081
FAILURE: Build failed with an Exception.
- What Went Wrong:
A problem occurred Configuring root project 'Gasagilmobile'.
Could not resolve all artifacts for Configuration ':classpath'. Could not resolve with.android.tools.build:Radle:3.4.2. Required by: project : Could not resolve with.android.tools.build:Radle:3.4.2. Could not get Resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom'. Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom'. sun.security.Validator.Validatorexception: PKIX path building failed: sun.security.Provider.certpath.Suncertpathbuilderexception: Unable to find Valid Certification path to requested target Could not resolve with.android.tools.build:Radle:3.4.2. Could not get Resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom'. Could not GET 'https://repo.jfrog.org/artifactory/libs-release-bintray/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom?referrer'. sun.security.Validator.Validatorexception: PKIX path building failed: sun.security.Provider.certpath.Suncertpathbuilderexception: Unable to find Valid Certification path to requested target
I am using version 10 of JDK. The version of my android studio is 3.5.3.
I tried to put these url’s in the browser to the url https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom the file is downloaded correctly, for the second I get the following error:
{
"errors" : [ { "status" means 404, "message" : "Could not find Resource" } ] }
I read that this may be a certificate issue. But I’m not an advanced java user and have no idea how to fix this.
Which operating system are you using? By the error seems to be setting environment. You configured all android environment ? System variables, path to sdk. Search for android Environment might be the problem.
– Leandro Sena
Yes @Leandrosena. I configured the entire environment according to the documentation on the Active Act page. The operating system I am using is Ubuntu 19.04.
– clluiz
I managed to solve the problem. It was really a certificate that was missing. I followed the procedures of this post: http://magicmonster.com/kb/prg/java/ssl/pkix_path_building_failed.html. The problem was that my java was without the correct certificate for the domain: https://www.google.com/chrome/. I exported the domain certificate and added it to my Store and everything is working now.
– clluiz
You need to restart your PC after doing the procedure described in the link I passed above.
– clluiz