Gradle 'AppName' project refresh failed
Error:Cause: hostname in certificate didn't match: <jcenter.bintray.com> != <*.services-exchange.com> OR <*.services-exchange.com> OR <services-exchange.com>
1.I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this.
2.First ,I want change the version of the package(the 'appacompat-v7' and 'design'),then I change it to 25.0.3,the IDE give me a tip,next I change the targetSdkVersion to 25 and compileSdkVersion. The gradle didn't work.
3.
dependencies {
classpath 'com.android.tools.build:gradle:2.10'
4.
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "AppName"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support.appcompat-v7:appacompat-v7:23.0.3'
compile 'com.android.support.design:design:23.0.3'
compile 'com.squareup.oktppp3:okhttp:3.10.0'
complie 'com.google.code.gson:gson:2.7'
complie 'com.android.recycleview-v7:23.0.3'
complie 'com.github.bumptech.glide:3.7.0'
complie 'com.wdullaer:masterladateimepicker:2.5.0'
}
How can I repair it?
You have a typo error. You should use this and change compile to implementation if you're using Android 3.0 and higher
compileSdkVersion 23
targetSdkVersion 23
Your applicationId should reflect your package name. Confirm this from your manifest.
Use 23.1.1 for dependencies
implementation 'com.android.support:appcompat-v7:23.1.1'
And this
classpath 'com.android.tools.build:gradle:3.1.3'
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments