Invalid source release error
Closed this issue · 6 comments
When I try to run an app I got this error (I0m using version 1.1.1):
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':screen_protector:compileDebugJavaWithJavac'.
invalid source release: 11
-
Try:
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. -
Get more help at https://help.gradle.org
BUILD FAILED in 8s
Running Gradle task 'assembleDebug'... 8.8s
Exception: Gradle task assembleDebug failed with exit code 1
This is the output of flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.2, on Linux Mint 20.3 5.4.0-120-generic, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] VS Code (version 1.68.1)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
! Doctor found issues in 2 categories.
In build.grade I have this
...
compileSdkVersion 31
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
defaultConfig {
...
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
...
Have the same error.
] * What went wrong:
[ ] Could not determine the dependencies of task ':screen_protector:compileDebugAidl'.
[ ] > Could not resolve all task dependencies for configuration ':screen_protector:debugCompileClasspath'.
[ ] > Could not find com.github.prongbang:screen-protector:1.0.0.
[ ] Required by:
[ ] project :screen_protector
[ ] * Try:
[ ] 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.
[ ] * Get more help at https://help.gradle.org
[ ] BUILD FAILED in 45s
I also have this problem, please check
Have the same error.
] * What went wrong: [ ] Could not determine the dependencies of task ':screen_protector:compileDebugAidl'. [ ] > Could not resolve all task dependencies for configuration ':screen_protector:debugCompileClasspath'. [ ] > Could not find com.github.prongbang:screen-protector:1.0.0. [ ] Required by: [ ] project :screen_protector [ ] * Try: [ ] 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. [ ] * Get more help at https://help.gradle.org [ ] BUILD FAILED in 45s
I also have this problem, Were you able to find a solution?
@ArielM24 Were you able to find a solution?
in android/build.grade I had this lines comment this lines and add the maven url
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io/' }
}
//tasks.withType(JavaCompile).configureEach {
// javaCompiler = javaToolchains.compilerFor {
// languageVersion = JavaLanguageVersion.of(8)
// }
// }
}
Fixed 1.1.5
Thank you for report 👍