flutter

gradle gives an error in sqflite_android and java


when i try to build a app it gives me this error:

`* What went wrong: Execution failed for task ':sqflite_android:compileDebugJavaWithJavac'.

Could not resolve all files for configuration ':sqflite_android:androidJdkImage'. Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.`

i already have the last version of java, of gradle and of the sqflite. I already also run flutter doctor and its all ok. i do flutter clean and run again

i do some research but none of the solutions work for me

Can you help me please? thanks in advance

i already have the last version of java, of gradle and of the sqflite. I already also run flutter doctor and its all ok. i do flutter clean and run again

i do some research but none of the solutions work for me

I already creat a new app of counter and it works fine


Solution

  • it is solved. you can close.

    the isue is about java and defining the way

    flutter config --jdk-dir /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/home

    and put you definition