Android Studio - How to Find Valid Certification Path to Requested Target

Error:Cause: unable to find valid certification path to requested target

This problem might be due to some restricted internet connections...
If you are installing build tools on some restricted network, the required certificates might not install... So try changing the network connection....
Worked for me.....

unable to find valid certification path to requested target after updating android studio 3.3.2

Downgrade your Android Gradle Plugin to 3.3.1

In your project-level build.gradle:

classpath 'com.android.tools.build:gradle:3.3.1'

Gradle sync failed: Cause: unable to find valid certification path to requested target on MacOS

I've been stuck with the exact same bug for several days, and like you I tried pretty much everything.

Finally I noticed something in Android Studio. I went to the Http Proxy preference tab and I saw a message saying

You have JVM property "https.proxyHost" set to "localhost"....

I tried to override this value by putting the line :

systemProp.https.proxyHost=

In my project gradle.properties file and tadaaa ! It works, I don't really understand what happened though...

Hoping to be helpful ;)

Android Studio: unable to find valid certification path to requested target

Changing all https to http in build.gradle worked for me.
ex : -

   maven {
url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
}

To : -

 maven {
url "http://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
}

Hope it work for others too.

How to solve error Unable to find valid certification path to requested target while executing command react-native run-android

After much struggle I got solution which was worked for me.

Solution:

Step 1:

Open (Project Level) gradle file and add repositories given below:

repositories {
google()
mavenCentral()
jcenter { url "https://jcenter.bintray.com/"}
}

allprojects {
repositories {
google()
mavenCentral()
maven {
url "https://maven.google.com"
}
jcenter { url "https://jcenter.bintray.com/"}
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed
from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}

Step 2: change directory to android i.e. cd android
Example: Here, my project name was FirstApp so the path was
C:\Users\HOME\Desktop\FirstApp
and then change directory: cd android
So that the path become look like this : C:\Users\HOME\Desktop\FirstApp\android

Step 3: Refresh dependencies i.e. sync your gradle with the following command
gradlew build --refresh-dependencies

Step 4: cd..

Step 5: Execute your react native project
react-native run-android

Hope, it will work to others also :)


Related Topics



Leave a reply



Submit