This issue started happening after upgrading my Kotlin version to 1.9.22 and Gradle plugin to 8.1.1.
Whenever I try to run the app on Android devices or Android emulator (no issues with iOS), I get this error message during assembleDebug:
Error: unable to find directory entry in pubspec.yaml: D:\Repositories\pocket-house-flutter-app-frontend\frontend_pockethouse\packages\pockethouse_classic\res\
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\pub-cache\hosted\pub.dev\firebase_messaging-14.8.0\android\src\main\java\io\flutter\plugins\firebase\messaging\FlutterFirebaseMessagingPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shared_storage:compileDebugKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17).
Consider using JVM Toolchain: https://kotl.in/gradle/jvm/toolchain
Learn more about JVM-target validation: https://kotl.in/gradle/jvm/target-validation
* 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 1m 58s
Error: Gradle task assembleDebug failed with exit code 1
Current workaround (PROJECT/android/build.gradle):
This issue started happening after upgrading my Kotlin version to 1.9.22 and Gradle plugin to 8.1.1.
Whenever I try to run the app on Android devices or Android emulator (no issues with iOS), I get this error message during assembleDebug:
Current workaround (PROJECT/android/build.gradle):
Updating build.gradle config for newest java and gradle version would be great 👍