- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我最近将我的 Android Studio 更新到 3.0.1 版,并开始了一个包含空白 Activity 的新项目。一旦 gradle 同步开始(只要我打开项目),我就会在事件日志中收到一条消息:
Gradle sync failed: Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Could not determine artifacts for 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.aar'.
Could not HEAD 'https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.aar'.
Connect to dl.google.com:443 [dl.google.com/216.58.197.46] failed: Connection refused: connect
Connection refused: connect
Consult IDE log for more details (Help | Show Log) (3s 878ms)
我从 Android SDK 管理器重新安装了支持存储库并将 maven 添加到依赖项,但到目前为止还无法解决问题。
构建等级:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://maven.google.com" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
应用级构建-gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.vishalbisht.test"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.1'
}
最佳答案
我能够通过在应用程序级 build-gradle 中评论以下行来解决这个问题
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.1'
然后它开始工作,不确定这是否是一个可接受的解决方案,但据我所知,我至少可以运行和编译我的代码。
同样在Android studio 3.1更新之后,我也没有遇到过这个问题。
关于android - Gradle 同步失败 : Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47827087/
我在运行 react-native run-android 时尝试实现第三方 SDK 包我收到以下错误: Execution failed for task ':app:checkDebugAarMe
我的 android studio 有下一个问题 原因:org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration
我不知道是什么导致了 flutter 中的这个错误,我只是尝试创建一个新项目,但我收到了这个错误,我已经升级并降级了我的 flutter SDK 仍然出现同样的错误,当我执行 flutter run
我是 Android studio 的新手,在编译从 codecanyon 购买的 android 项目时遇到了这种错误。我错过了什么”? Could not resolve all dependen
我最近将我的 Android Studio 更新到 3.0.1 版,并开始了一个包含空白 Activity 的新项目。一旦 gradle 同步开始(只要我打开项目),我就会在事件日志中收到一条消息:
我正在尝试通过升级到 kotlin 1.7.20 来升级到 compose compiler 1.3.2 但我一直收到错误提示 Caused by: org.gradle .api.internal.
我是一名优秀的程序员,十分优秀!