skip to Main Content

My application written in flutter language gives the following error:

e: C:/Users/Mert/Desktop/isg_yeni/isg/build/sensors_plus/.transforms/850bf5b7a09199329b383f74fe33a0fc/transformed/out/jars/classes.jar!/META-INF/sensors_plus_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0.
e: C:/Users/Mert/Desktop/isg_yeni/isg/build/share_plus/.transforms/738a704c1196ddd6d9f00fc45e444923/transformed/out/jars/classes.jar!/META-INF/share_plus_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0.
e: C:/Users/Mert/.gradle/caches/transforms-3/ed354497fa2c673eab69beae667a9b99/transformed/jetified-activity-1.7.2/jars/classes.jar!/META-INF/activity_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/Mert/.gradle/caches/transforms-3/40e78fa6fa60bb3dcae93e8b1ce197e9/transformed/lifecycle-livedata-2.6.1/jars/classes.jar!/META-INF/lifecycle-livedata_release.kotlin_module: Module was compiled with an incompatible version of
Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/Mert/.gradle/caches/transforms-3/77a0c98133178853d799635ee4a20e81/transformed/lifecycle-viewmodel-2.6.1/jars/classes.jar!/META-INF/lifecycle-viewmodel_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/Mert/.gradle/caches/transforms-3/d6680c3721692dc4a9fb42dbecaa2262/transformed/lifecycle-livedata-core-2.6.1/jars/classes.jar!/META-INF/lifecycle-livedata-core_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/Mert/.gradle/caches/transforms-3/8ae031f1d0da2125f68c17d76f9088e5/transformed/jetified-lifecycle-viewmodel-savedstate-2.6.1/jars/classes.jar!/META-INF/lifecycle-viewmodel-savedstate_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/Mert/.gradle/caches/transforms-3/fb73caa49f1892fee8d409818e83296f/transformed/jetified-core-ktx-1.10.1/jars/classes.jar!/META-INF/core-ktx_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/Mert/.gradle/caches/transforms-3/f2c1b21e2617b8adc4232d8977a76481/transformed/core-1.10.1/jars/classes.jar!/META-INF/core_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version
of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/Mert/.gradle/caches/transforms-3/ca5afb2fabe5b1e390fd5c06c8f1bc5d/transformed/lifecycle-runtime-2.6.1/jars/classes.jar!/META-INF/lifecycle-runtime_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/Mert/.gradle/caches/modules-2/files-2.1/androidx.lifecycle/lifecycle-common/2.6.1/10f354fdb64868baecd67128560c5a0d6312c495/lifecycle-common-2.6.1.jar!/META-INF/lifecycle-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/Mert/.gradle/caches/transforms-3/f62a687ef6392077f061d3a97cabe81c/transformed/jetified-savedstate-1.2.1/jars/classes.jar!/META-INF/savedstate_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: C:/Users/Mert/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.20/e58b4816ac517e9cc5df1db051120c63d4cde669/kotlin-stdlib-1.9.20.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0.
e: C:/Users/Mert/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.20/e58b4816ac517e9cc5df1db051120c63d4cde669/kotlin-stdlib-1.9.20.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0.
e: C:/Users/Mert/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.20/e58b4816ac517e9cc5df1db051120c63d4cde669/kotlin-stdlib-1.9.20.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0.

This error appeared when I ran flutter build apk –release

2

Answers


  1. Chosen as BEST ANSWER

    I did what you said and then it gave me this error: FAILURE: Build completed with 2 failures.

    1: Task failed with an exception.

    • What went wrong: A problem occurred configuring project ':open_file'.

    Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl. Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

     If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.
    
    • 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. ==============================================================================

    2: Task failed with an exception.

    • What went wrong: Failed to query the value of property 'buildFlowServiceProperty'.

    Could not isolate value org.jetbrains.kotlin.gradle.plugin.statistics.BuildFlowService$Parameters_Decorated@1ad31f58 of type BuildFlowService.Parameters A problem occurred configuring project ':open_file'. > Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl. > Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

           If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.
    
    • 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. ==============================================================================

    BU�LD FAILED in 1s


  2. It’s hard to say exactly what’s wrong because you didn’t provide a minimal, reproducible example, but I think this has a chance to solve your problem (by looking at the error messages you’re getting):

    In android/build.gradle, set ext.kotlin_version = '1.9.0'.

    Also, make sure that you’re using the latest versions of all Flutter packages/plugin in pubspec.yaml. If you added native Android dependencies, also make sure to update their to latest stable versions (in android/app/build.gradle).


    In general, I recommend you always use latest dependencies:

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search