如何修复同步时出现的停止工作的渐变错误



我的Android项目中存在gradle问题。我觉得自己解决不了这个问题很愚蠢。我昨天晚上关闭了这个项目,今天早上重新开放,所以gradle一点也不感动。今天早上我收到以下错误

Could not compile build file 'D:CodeAndroidworkouttrackerappbuild.gradle'.
> startup failed:
build file 'D:CodeAndroidworkouttrackerappbuild.gradle': 87: Unexpected input: '{' @ line 87, column 14.
dependencies {

所以我猜这一定是一个丢失的刹车,但我在我的建筑等级中找不到一个,也许我很愚蠢或失明。当我在项目direcroy 中运行gradlew时,我得到了同样的错误

这是我的build.gradle(在我尝试修复它之后(

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

configurations.implementation {
exclude group: 'org.jetbrains' , module:'annotations'
exclude group: 'org.jetbrains.kotlin' , module:'kotlin-stdlib'
exclude group: 'com.intellij', module:'annotations'
exclude group: 'com.intellij', module:'annotations'
exclude group: 'com.intellij', module:'annotations'
}
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
compileSdkVersion 30
buildToolsVersion '32.0.0-rc1'
defaultConfig {
applicationId 'ch.workouttracker'
minSdkVersion 28
targetSdkVersion 30
versionCode 901
versionName '0.9.0.1'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
resConfigs "de" // And any other languages you support
}
signingConfigs {
release {
storeFile file("C:\Users\DonBolli\.android\debug.keystore")
storePassword ANDROID_STORE_PASSWORD
keyAlias 'workouttrackerkey'
keyPassword ANDROID_KEY_PASSWORD
}
debug {
storeFile file("C:\Users\DonBolli\.android\debug.keystore")
storePassword ANDROID_STORE_PASSWORD
keyAlias 'workouttrackerkey'
keyPassword ANDROID_KEY_PASSWORD
}
}
buildTypes {
debug {
minifyEnabled false
signingConfig signingConfigs.debug
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.md'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.md'
exclude 'META-INF/DEPENDENCIES'
}
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
allprojects {
repositories {
mavenCentral()
maven { url = "https://maven.fabric.io/public" }
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

//Firebase
implementation platform('com.google.firebase:firebase-bom:29.0.0')
implementation ("com.google.firebase:firebase-core:20.0.0") {
exclude group: "com.android.support", module: "support-v4"
}
implementation 'com.google.firebase:firebase-messaging:23.0.0'
implementation 'com.google.firebase:firebase-analytics:20.0.0'
implementation 'com.google.firebase:firebase-plugins:2.0.0'
implementation 'com.google.firebase:firebase-ml-vision:24.0.0'
implementation ("com.google.firebase:firebase-auth:21.0.1") {
exclude group: "com.android.support", module: "support-v4"
}
implementation 'com.google.firebase:firebase-database:20.0.2'
implementation 'com.google.firebase:firebase-storage:20.0.0'

//CrashAlyrics
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'

//Graphview
implementation 'com.jjoe64:graphview:4.2.1'
implementation 'org.apache.commons:commons-lang3:3.4'

//Google Play
implementation ("com.google.android.gms:play-services-base:17.6.0") {
exclude group: "com.android.support", module: "support-v4"
}
implementation 'com.google.android.gms:play-services-auth:19.2.0'

//Support
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.appcompat:appcompat-resources:1.1.0"
implementation "androidx.navigation:navigation-fragment-ktx:2.2.1"
implementation "androidx.drawerlayout:drawerlayout:1.0.0"
implementation "androidx.gridlayout:gridlayout:1.0.0"
implementation "androidx.preference:preference:1.1.0"
implementation "androidx.recyclerview:recyclerview:1.1.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation "io.reactivex.rxjava2:rxjava:2.2.13"
implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
// Gradle
implementation com.android.tools.build:gradle);
//Glide
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
/**
* dependency to request the runtime permissions.
*/
implementation 'com.karumi:dexter:4.2.0'
// code generator for view
implementation "com.jakewharton:butterknife:10.2.0"
annotationProcessor "com.jakewharton:butterknife-compiler:10.2.0"
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

依赖项内部出现错误

// Gradle
implementation com.android.tools.build:gradle);

将此更改为

// Gradle
implementation 'com.android.tools.build:gradle'

最新更新