无法获取资源 'https://dl.google.com/dl/android/maven2/com/android/support/support-fragment/28.0.0/support-fragment-28.0.0.aar'
Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/support/support-fragment/28.0.0/support-fragment-28.0.0.aar'
我想构建一个简单的基于片段的应用程序,但我无法加载库。
我尝试了什么:
- 更新代理设置
- 删除代理
- 设置检查
- 检查连接
- 添加:
// 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.4.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.Properties
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
defaultConfig {
applicationId "com.example.fragmentmanagementmainactivity"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta1'
testImplementation 'junit:junit:4.13-beta-3'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:support-v13:28.0.0'
implementation 'com.android.support:support-fragment:28.0.0'
}
一切都是从 'com.android.support:support-v4:28.0.0' 的实施开始的
没用
- 您要么在您的(应用)build.gradle 中导入了错误的依赖项,要么
- 您的 device/network.
上有一些 DNS 问题
- 你或许也可以试试这个;
将此添加到应用程序 build.gradle
repositories {
maven { url "https://maven.google.com" }
}
我希望是其中之一,因为它们很容易解决。让我知道它是否已解决。
编辑:添加 3
我想构建一个简单的基于片段的应用程序,但我无法加载库。
我尝试了什么:
- 更新代理设置
- 删除代理
- 设置检查
- 检查连接
- 添加:
// 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.4.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.Properties
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
defaultConfig {
applicationId "com.example.fragmentmanagementmainactivity"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta1'
testImplementation 'junit:junit:4.13-beta-3'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:support-v13:28.0.0'
implementation 'com.android.support:support-fragment:28.0.0'
}
一切都是从 'com.android.support:support-v4:28.0.0' 的实施开始的 没用
- 您要么在您的(应用)build.gradle 中导入了错误的依赖项,要么
- 您的 device/network. 上有一些 DNS 问题
- 你或许也可以试试这个; 将此添加到应用程序 build.gradle
repositories {
maven { url "https://maven.google.com" }
}
我希望是其中之一,因为它们很容易解决。让我知道它是否已解决。
编辑:添加 3