android file-dependancy android-support-library android-gradle-plugin android-recyclerview
升级到androidstudio 3.0后,gradle停止工作:
无法解析':app @ debug/compileClasspath'的依赖关系:无法解析com.android.support:appcompat-v7:26.1.0.
无法解析com.android.support:appcompat-v7:26.1.0.要求:项目:app
无法解析com.android.support:appcompat-v7:26.1.0.无法获取资源" https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom ".无法获取" https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom ".连接到dl.google.com:443 [dl.google.com/172.217.22.110]失败:连接超时:连接已连接超时:连接
我检查了代理,它的工作原理.
这是一个新项目,没有改变android studio向导生成的内容.
谢谢你的帮助.
我安装了最新版本的android studio。我有已经安装的jdk 8。当我打开android studio时,出现以下错误。
Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.1.0.
Could not resolve com.android.support:appcompat-v7:26.1.0.
Required by:
project :app
> Could not resolve com.android.support:appcompat-v7:26.1.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> unable to find valid certification path to requested target
Run Code Online (Sandbox Code Playgroud)
因此,我删除了JDK …
我下载了Android Studio 3.0,并开始关注构建我的第一个应用教程.但Gradle抛出的错误如下:
无法解析com.android.support:appcompat-v7:26.1.0.
最终我发现我正在使用Android Studio的代理:
要解决这个错误,我必须通过将这些行添加到gradle.properties文件来实现Gradle的代理:
systemProp.http.proxyHost=127.0.0.1
systemProp.http.nonProxyHosts=localhost, 127.0.0.1
org.gradle.jvmargs=-Xmx1536m
systemProp.http.proxyPort=8118
systemProp.https.proxyHost=127.0.0.1
systemProp.https.nonProxyHosts=localhost, 127.0.0.1
systemProp.https.proxyPort=8118
Run Code Online (Sandbox Code Playgroud)
添加上述语句后gradle.properties,错误得到解决.请注意,需要将两个 代理HTTP和HTTPS代理添加到Gradle属性
There are many different questions about this, but the problems there are about using v7.28.0, v7.28.+, v7.28.0.0-rc02 But when I sync my project I get this error:
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:28.0.0.
I've checked Support library setup and followed it's instructions but it didn't help.
This is my module app
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/'}
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.12.1'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url …Run Code Online (Sandbox Code Playgroud)