Hello, I followed the android.jar file replacement guide. However, when I change the Build Variants or build.gradle and have to re-sync the project afterwards, I get the error:
Could not resolve all files for configuration ':app:androidApis'.
Failed to transform android.jar to match attributes {artifactType=android-mockable-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime, returnDefaultValues=false}.
Execution failed for MockableJarTransform: C:\ProgramData\Sdk\platforms\android-34\android.jar.
Unsupported class file major version 61
After that, I tried updating java from JDK-11 to JDK-17 and tried to clean it up then rebuild the project, at this point, only the error Unsupported class file major version 61 appeared.
I tried Invalidate Caches/Restart but still didn't fix the above error.
Hello, I followed the android.jar file replacement guide. However, when I change the Build Variants or build.gradle and have to re-sync the project afterwards, I get the error:
After that, I tried updating java from JDK-11 to JDK-17 and tried to clean it up then rebuild the project, at this point, only the error
Unsupported class file major version 61
appeared.I tried Invalidate Caches/Restart but still didn't fix the above error.
My Android Studio Info: