无法访问com.google.android.gms.tasks的任务类文件。找不到任务

无法访问com.google.android.gms.tasks的任务类文件。找不到任务,android,Android,好的,我有一个问题作为标题。上面说 错误:(69,27)错误:无法访问的任务类文件 找不到com.google.android.gms.tasks.Task 我不知道这意味着什么以及如何解决它。我几乎找了一天,什么也帮不了我 apply plugin: 'com.android.application' android { signingConfigs { config { keyAlias 'key' keyPasswo

好的,我有一个问题作为标题。上面说

错误:(69,27)错误:无法访问的任务类文件 找不到com.google.android.gms.tasks.Task

我不知道这意味着什么以及如何解决它。我几乎找了一天,什么也帮不了我

apply plugin: 'com.android.application'

android {
    signingConfigs {
        config {
            keyAlias 'key'
            keyPassword 'pass'
            storeFile file('C:/Users/Alan/Nameless_release_key.jks')
            storePassword 'pass'
        }
    }
    compileSdkVersion 26
    buildToolsVersion "25.0.0"
    defaultConfig {
        applicationId "com.sstudio.nameless"
        minSdkVersion 16
        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'
            debuggable true
            signingConfig signingConfigs.config
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.0.2'
    compile 'com.google.firebase:firebase-database:10.0.1'
    compile 'com.firebaseui:firebase-ui-database:2.3.0'
    compile 'com.android.support:recyclerview-v7:26.0.2'
    testCompile 'junit:junit:4.12'
}



apply plugin: 'com.google.gms.google-services'
这是我的gradle控制台输出

Executing tasks: [:app:assembleDebug]

Parallel execution is an incubating feature.
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to C:\Users\Alan\AppData\Local\Android\Sdk\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

The setTestClassesDir(File) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the setTestClassesDirs(FileCollection) method instead.
The getTestClassesDir() method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the getTestClassesDirs() method instead.
The ConfigurableReport.setDestination(Object) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the method ConfigurableReport.setDestination(File) instead.
:app:buildInfoDebugLoader
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:prepareAndroidArchCoreRuntime100Alpha8Library
:app:prepareAndroidArchLifecycleExtensions100Alpha8Library
:app:prepareAndroidArchLifecycleRuntime100Alpha8Library
:app:prepareComAndroidSupportAnimatedVectorDrawable2602Library
:app:prepareComAndroidSupportAppcompatV72602Library
:app:prepareComAndroidSupportRecyclerviewV72602Library
:app:prepareComAndroidSupportSupportCompat2602Library
:app:prepareComAndroidSupportSupportCoreUi2602Library
:app:prepareComAndroidSupportSupportCoreUtils2602Library
:app:prepareComAndroidSupportSupportFragment2602Library
:app:prepareComAndroidSupportSupportMediaCompat2602Library
:app:prepareComAndroidSupportSupportV42602Library
:app:prepareComAndroidSupportSupportVectorDrawable2602Library
:app:prepareComFirebaseuiFirebaseUiDatabase230Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement1104Library
:app:prepareComGoogleAndroidGmsPlayServicesTasks1104Library
:app:prepareComGoogleFirebaseFirebaseAnalytics1001Library
:app:prepareComGoogleFirebaseFirebaseAnalyticsImpl1001Library
:app:prepareComGoogleFirebaseFirebaseCommon1104Library
:app:prepareComGoogleFirebaseFirebaseCore1001Library
:app:prepareComGoogleFirebaseFirebaseDatabase1104Library
:app:prepareComGoogleFirebaseFirebaseDatabaseConnection1104Library
:app:prepareComGoogleFirebaseFirebaseIid1001Library
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:processDebugGoogleServices
Parsing json file: C:\Users\Alan\Desktop\New folder\Nameless\app\google-services.json
:app:generateDebugResources
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac
C:\Users\Alan\Desktop\New folder\Nameless\app\src\main\java\com\sstudio\nameless\ChatActivity.java:69: error: cannot access Task
        me.push().setValue("online");
                          ^
  class file for com.google.android.gms.tasks.Task not found
1 error

 FAILED
:app:buildInfoGeneratorDebug

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 12s

38 actionable tasks: 33 executed, 5 up-to-date

帮帮我。如果你需要更多的信息,我会更新它

谢谢大家的回复。问题已经解决了将每个依赖项和平台插件更新到其最新版本解决了这个问题。给你们所有人,永远不要。。。切勿忽略更新。除非你想砰的一声,让你的头流血

很抱歉,更新后清理项目确实为我解决了问题。我无法解释它到底是如何工作的,因为我自己对这个问题不太了解。对不起,祝你好运。