Hi. I have been trying to get Android Studio to s...
# android
j
Hi. I have been trying to get Android Studio to stop reporting the following lint error in the build.gradle files. It seems to build fine.
Copy code
Cannot access class 'java.io.File'. Check your module classpath for missing or conflicting dependencies
I have searched all over for an explanation but without much luck. It occurs in the root build.gradle.kts when referencing
rootProject.rootDir
or
project.buildDir
(interestingly not seeming to error if referenced in the app Gradle file) and in the app build.gradle.kts when setting the ApolloGraphQL path which introspects to the function
org.gradle.api.file.FileSystemLocationProperty.set(@Nullable File file)
. The error has persisted across more than one version of the libraries, currently using Gradle 7.4.2 and Gradle plugin-in 7.1.3.
Assuming this is relevant, the root build.gradle.kts buildscript dependency classpath looks like the following
Copy code
buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:7.1.3")
        classpath("com.google.dagger:hilt-android-gradle-plugin:2.41")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10")
        classpath("com.newrelic.agent.android:agent-gradle-plugin:6.5.0")
    }
}