I am new to Android Studio and I keep getting this error. I have researched and tried deleting .gradle, closing program and restarting, checking power save mode, and Cleaning and Rerunning. Any other ideas to try would be greatly appreciated. It worked perfect last night and now I am getting this error.
Error:Could not open cp_init class cache for initialization script 'C:\Users\Owner\AppData\Local\Temp\asLocalRepo6.gradle' (C:\Users\Owner.gradle\caches\2.10\scripts\asLocalRepo6_4rdykqo5vjpjfhlk1g3pwkx76\cp_init).
java.io.FileNotFoundException: C:\Users\Owner.gradle\caches\2.10\scripts\asLocalRepo6_4rdykqo5vjpjfhlk1g3pwkx76\cp_init\cache.properties (The system cannot find the file specified)
Thanks!
Set the Build, Execution, Deployment > Build Tools > Gradle > Gradle JVM to "Use Internal JRE (java version 11-ea+123"....)
https://youtrack.jetbrains.com/issue/KT-34134
You might also be running a too-new version of Java. Downgrading to Java 1.8 via https://adoptopenjdk.net/ fixed this issue for me.
See BUG! exception in phase 'semantic analysis'
I had this same problem sometimes ago. This is my solution
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With