Widespread Augmented Reality

Widespread Augmented Reality
Click on the image to get the Android Augmented Reality Heads up Display

Thursday, September 7, 2023

Android Studio Error: Unable to make field private final java.lang.String java.io.File.path accessible

Unable to make field private final java.lang.String java.io.File.path accessible:
Unable to make field private final java.lang.String java.io.File.path
accessible: module java.base does not "opens java.io" to unnamed module

Resolved with:


  • In build.gradle (project)

    dependencies {
    //classpath 'com.android.tools.build:gradle:4.1.2' classpath 'com.android.tools.build:gradle:4.1.3'
    classpath 'com.google.gms:google-services:4.3.15'
    classpath("com.android.tools.build:gradle:7.0.0")
    }
  • In gradle-wrapper.properties

    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
  • Leaving build.gradle (app) as is.
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7
  • Not updating android plugin
  • No comments:

    Post a Comment