Error: org.gradle.api.internal.changedetection.state

I am trying to test the application on my phone. Whenever I create a project, the following error appears in Android Studio 2.2.

Error: org.gradle.api.internal.changedetection.state.FileCollectionSnapshotImpl could not be passed to org.gradle.api.internal.changedetection.state.OutputFilesCollectionSnapshotter $ OutputFilesSnapshot Possible causes of this unexpected error:

  • The gradle dependency cache may be corrupted (this sometimes happens after a network connection timeout). Restart dependencies and synchronization project (network required).
  • The state of the Gradle build process (daemon) may be corrupted. Stopping all Gradle daemons can solve this problem. Stop Gradle build processes (reboot required)
  • Your project may use a third-party plugin that is incompatible with other project plugins or the Gradle version requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.3"
    defaultConfig {
        applicationId "com.example.harshohri.myapplication"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    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:24.2.1'
    compile 'com.google.android.gms:play-services:9.6.1'
    compile 'com.android.support:support-v4:24.2.1'
    testCompile 'junit:junit:4.12'
}

I killed java processes by restarting the computer. I uninstalled Gradle and reinstalled it, but still ran into an error

+4
source share

Source: https://habr.com/ru/post/1656495/


All Articles