I am getting following error in Android Studio 2.3.2 when i am trying to create Empty Activity project. I also getting this when i try to import a project.
Error:Cause: unable to find valid certification path to requested target
Here my gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
I have also tried replacing jcenter()
with
jcenter {
url "http://jcenter.bintray.com/"
}
Or
maven {
url "http://repo1.maven.org/maven2"
}
And my gradle distribution url is points to latest
distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip
I have already checked many threads in different forums but can't solve my one from these.
- Android Studio - Unable to find valid certification path to requested target
- Error:Cause: unable to find valid certification path to requested target
Edit: As the Android community seems pretty much inactive, what should i do now ? Someone please atleast as me in comment section.
In my another machine this error was shown with a URL. I resolved that by putting the jar into the libs folder after manually downloading. But for this problem, i can't find a solution!