Build Fail for the First Time
chrisk8er opened this issue · comments
Krestian Weken commented
I have got this error after trying to run ionic capacitor run android
[capacitor] ✖ Running Gradle build - failed!
[capacitor] [error]
[capacitor] FAILURE: Build failed with an exception.
[capacitor]
[capacitor] * What went wrong:
[capacitor] Could not open settings generic class cache for settings file '/Users/chrisk8er/Documents/Projects/capacitor-testapp/android/settings.gradle' (/Users/chrisk8er/.gradle/caches/7.0/scripts/4q8mdrtree07u9ffzpsj5y2nh).
[capacitor] > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 61
[capacitor]
[capacitor] * Try:
[capacitor] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[capacitor]
[capacitor] * Get more help at https://help.gradle.org
[capacitor]
[capacitor] BUILD FAILED in 787ms
[capacitor]
[ERROR] An error occurred while running subprocess capacitor.
capacitor run android --target adb-lzmrqw6llfaymzcu-JcfkWE._adb-tls-connect._tcp... exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
jcesarmobile commented
that seems to be a problem with java 17, try downgrading to java 11 or upgrading gradle to 7.3 or newer