我在同步gradle时在android Studio 2.2.3中出现以下错误.
错误:原因:无法找到所请求目标的有效证书路径
我该如何解决这个问题
我也在添加我的Gradle文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.sample.myapplication"
minSdkVersion 16
targetSdkVersion 22
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:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:palette-v7:23.4.0'
testCompile 'junit:junit:4.12'
// FireBase
compile 'com.google.firebase:firebase-messaging:9.0.0'
}//Add this line
apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud)
和项目级别Gradle文件
buildscript {
repositories { …Run Code Online (Sandbox Code Playgroud) 我正在使用本机做一个Android应用程序,这是我得到的错误:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':react-native-fetch-blob'.
> Could not resolve all artifacts for configuration ':react-native-fetch-blob:classpath'.
> Could not find com.android.tools.build:gradle:2.2.3.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.jar
Required by:
project :react-native-fetch-blob
我也收到以下警告:
> Configure project :app
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (26.0.2) …