- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在我最新的 android studio (4.1.1) 中构建一个旧应用程序(Udacity Android 基础类(class),2017 年)。旧应用需要:
所以我安装了 android build tools v23.0.2,但我每次都收到同步错误。请帮忙。
Gradle sync started
14:34 Gradle sync failed: Unsupported method: SyncIssue.getMultiLineMessage().
The version of Gradle you connect to does not support that method. To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
Consult IDE log for more details (Help | Show Log) (17 s 149 ms)
下面是我的 build.gradle(:) 文件:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
下面是我的 gradle.wrapper.propertise 文件
#Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
下面是我的 app/build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.android.quakereport"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
}
最佳答案
仅更改类路径编号对我不起作用。但我找到的解决方案确实如此:
https://github.com/udacity/ud839_Miwok/issues/215#issuecomment-716142250
I confirm the issue was fixed by making the below changes/additions inthe following files:
build.gradle
and
gradle-wrapper.properties
In the build.gradle file I have added
maven { url 'https://maven.google.com/' name 'Google' }
in both thebuildscript and allprojects just below jcenter() and changed theclasspath toclasspath 'com.android.tools.build:gradle:4.1.0'
// Top-level build file where you can add configuration options commonto all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
} }
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
} }
task clean(type: Delete) {
delete rootProject.buildDir }
and in the Gradle Properties I did the changes mentioned by @ Diver1rn and changeddistributionUrl=https://services.gradle.org/distributions/gradle-6.5-all.zip
#Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists distr
ibutionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
Hope this helps all the others who are stuck and want to fix thisissue with a copy and paste solution only.
关于android - 如何修复 : Gradle sync failed: Unsupported method: SyncIssue. getMultiLineMessage(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65406144/
我正在尝试在需要 Gradle 1.10 的最新版本的 Android Studio 上构建这个旧应用程序。我不断收到同步错误(见下文)。 SYNC ERROR: Gradle sync failed
我正在尝试在我最新的 android studio (4.1.1) 中构建一个旧应用程序(Udacity Android 基础类(class),2017 年)。旧应用需要: Android SDK v
我是一名优秀的程序员,十分优秀!