Search code examples
javaandroidjava-17

cannot access Record in Android Studio


I am getting error: cannot access Record class file for java.lang.Record not found

I have configured JDK 17 and able to use other JDK 17 features like enhanced switch, triple quotes (""") enter image description here

Please help on this.

There is no error while writing code but error is occurring on build. enter image description here


Solution

  • Please try to update your build version to 34. Ref: Using JDK17 & Record in Android Studio (Java, Android)