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.
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!
This is too late but I have faced same issue and resolve it.
I am getting this issue due to I am running Android Studio behind corporate proxy(Office PC). In this case you have to setup proxy in Android Studio.
Here is details form Android for Proxy setup:
Android Studio supports HTTP proxy settings so you can run Android Studio behind a firewall or secure network. To set the HTTP proxy settings in Android Studio:
Yo can find more details about this on below link https://developer.android.com/studio/intro/studio-config#proxy
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