gpt4 book ai didi

java - 我一直收到此错误(Gradle项目同步失败。基本功能无法正常运行)

转载 作者:行者123 更新时间:2023-12-03 06:29:30 24 4
gpt4 key购买 nike

我一直收到这个Gradle错误,尽管我确实更新了每个Gradle配置键,并且仔细检查了每一行。我还是不明白是什么问题?

Gradle project sync failed.Basic functionality(eg editing,debugging) will not work properly



它告诉我查看错误信息的查看窗口以及其中的内容:
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
:wrapper UP-TO-DATE

BUILD SUCCESSFUL in 0s
1 actionable task: 1 up-to-date
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

CONFIGURE SUCCESSFUL in 0s

Gradle
apply plugin: 'com.android.application'

android {
compileSdkVersion 26

dexOptions {
javaMaxHeapSize "4g"
}


lintOptions {
quiet true
abortOnError false
ignoreWarnings true
}
configurations {
all*.exclude group: 'commons-io'

}

packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'BinaryEncoder.java'
}

defaultConfig {
applicationId 'com.xxx.xxx'
minSdkVersion 16
targetSdkVersion 26
versionCode 3
versionName '1.2'
multiDexEnabled true
ndk {
abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'mips'
}
resConfigs 'en'

}
sourceSets {
main {
java {
exclude 'com.twilio:client-android:1.2.18.org.apache.http.lejacy.jar.org.apache.BinaryEncoder.java'
exclude 'org.apache.commons.codec.BinaryEncoder.java'
}
}
androidTest {
java {
exclude 'commons-codec-1.10/**'
}
}
}

buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

repositories {
mavenCentral()
}


dependencies {
configurations { all*.exclude group: 'com.android.support', module: 'support-v13' }
implementation fileTree(include: '*.jar', dir: 'libs')
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation('com.github.hotchemi:permissionsdispatcher:2.4.0') { exclude module: 'support-v13'}
implementation 'com.stripe:stripe-android:7.0.1'
implementation 'com.braintreepayments.api:braintree:2.7.0'
implementation 'com.braintreepayments.api:drop-in:3.1.0'
implementation 'jp.wasabeef:recyclerview-animators:2.2.7'
implementation 'com.github.markomilos:paginate:0.5.1'
implementation 'com.github.czy1121:segmentedview:1.0.0'
implementation 'com.orhanobut:logger:2.2.0'
implementation 'com.twilio:client-android:1.2.18'
implementation 'com.squareup.okio:okio:1.11.0'
implementation 'com.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.6.0'
implementation 'com.github.mukeshsolanki:country-picker-android:1.1.9'
implementation 'com.google.android.gms:play-services-gcm:11.4.0'
implementation 'com.google.android.gms:play-services-identity:11.4.0'
implementation 'com.google.android.gms:play-services-plus:11.4.0'
implementation 'com.google.android.gms:play-services-maps:11.4.0'
implementation 'lib.kingja.switchbutton:switchbutton:1.1.3'
implementation 'com.orhanobut:hawk:2.0.1'
implementation 'com.afollestad:material-camera:0.4.4'
implementation 'com.werb.pickphotoview:pickphotoview:0.3.0'
implementation 'com.github.Kennyc1012:BottomSheet:2.3.4'
implementation 'com.facebook.android:facebook-android-sdk:4.35.0'
implementation 'com.android.support:design:26.0.1'
implementation 'com.android.support:cardview-v7:26.0.1'
implementation 'com.android.support:multidex:1.0.1'
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'com.squareup.okhttp:okhttp:2.5.0'
implementation 'de.greenrobot:eventbus:2.4.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.paypal.sdk:paypal-android-sdk:2.14.4'
implementation 'com.koushikdutta.ion:ion:2.1.8'
implementation 'com.afollestad.material-dialogs:core:0.8.6.0'
implementation 'com.amitshekhar.android:android-networking:1.0.0'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.android.support:support-v4:26.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-messaging:11.4.0'
implementation 'com.google.firebase:firebase-core:11.4.0'
testImplementation 'junit:junit:4.12'
annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:2.4.0'
}
apply plugin: 'com.google.gms.google-services'

更新

这是porgrad gradle文件
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.1.0'
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://dl.bintray.com/drummer-aidan/maven' }
maven { url 'https://jitpack.io' }

maven {
url 'https://maven.google.com/'
name 'Google'
}
}

}

task clean(type: Delete) {
delete rootProject.buildDir
}

最佳答案

您可以使用以下命令来标识compile配置依赖项:

./gradlew app:dependencies --configuration compile

关于java - 我一直收到此错误(Gradle项目同步失败。基本功能无法正常运行),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53187410/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com