skip to Main Content

I have old project need updates, after updating codes as sdk: ^3.5.0
I had ext.kotlin_version problem, the problems starts that all Gradle in new structures so I can’t solve it with search’s result

here the log when "flutter build apk"

e: C:/Users/Husamuldeen/.gradle/caches/transforms-3/7428d87eca04b8a66b03c2875f74aed6/transformed/fragment-1.7.1-api.jar!/META-INF/fragment_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/Husamuldeen/.gradle/caches/transforms-3/3e80ee7d0bbfaf800710e08738ee8d47/transformed/jetified-activity-1.8.1-api.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/Husamuldeen/.gradle/caches/transforms-3/e5a134e3998c339ac98114dba08f806b/transformed/jetified-lifecycle-livedata-core-ktx-2.7.0-api.jar!/META-INF/lifecycle-livedata-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/Husamuldeen/.gradle/caches/transforms-3/cc2e34c1141d5416fc8834f9fbd0b13b/transformed/lifecycle-livedata-2.7.0-api.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/Husamuldeen/.gradle/caches/transforms-3/6efc486cc614b1c134085cbfe0dc1ea1/transformed/lifecycle-viewmodel-2.7.0-api.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/Husamuldeen/.gradle/caches/transforms-3/66a15401fa95fa1def8bcb39dad50d48/transformed/lifecycle-livedata-core-2.7.0-api.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/Husamuldeen/.gradle/caches/transforms-3/7cb5459602d20c6c9df4ece3d17e4097/transformed/jetified-lifecycle-process-2.7.0-api.jar!/META-INF/lifecycle-process_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/Husamuldeen/.gradle/caches/modules-2/files-2.1/androidx.lifecycle/lifecycle-common/2.7.0/85334205d65cca70ed0109c3acbd29e22a2d9cb1/lifecycle-common-2.7.0.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/Husamuldeen/.gradle/caches/transforms-3/818745901e6e8b25a6c3ef15130c84d6/transformed/lifecycle-runtime-2.7.0-api.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/Husamuldeen/.gradle/caches/transforms-3/310070c73b9e3fa50e93681b69530d3f/transformed/jetified-lifecycle-viewmodel-savedstate-2.7.0-api.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/Husamuldeen/.gradle/caches/transforms-3/8f74a46915e4902e43fc2ba4d5115365/transformed/jetified-core-ktx-1.13.1-api.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/Husamuldeen/.gradle/caches/transforms-3/a174211aaae51cc22f97d3830203be9a/transformed/core-1.13.1-api.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/Husamuldeen/.gradle/caches/transforms-3/ab76a8d862156f391d4c9c67a7f8d883/transformed/jetified-savedstate-1.2.1-api.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/Husamuldeen/.gradle/caches/transforms-3/7bf56b97a18154574b7fd11eb5e856ee/transformed/jetified-window-1.2.0-api.jar!/META-INF/window_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/Husamuldeen/.gradle/caches/transforms-3/ea71884a7a9f9ec5614eb47fe12fe2b6/transformed/jetified-window-java-1.2.0-api.jar!/META-INF/window-java_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/Husamuldeen/.gradle/caches/transforms-3/f66114939cca7f864f09af78b910bb1f/transformed/jetified-kotlinx-coroutines-core-jvm-1.7.1.jar!/META-INF/kotlinx-coroutines-core.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/Husamuldeen/.gradle/caches/transforms-3/442fc1ee1afc19819871375e623c976a/transformed/jetified-kotlinx-coroutines-android-1.7.1.jar!/META-INF/kotlinx-coroutines-android.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/Husamuldeen/.gradle/caches/transforms-3/8020430956ebf7f2e70e0169ef7f1774/transformed/jetified-kotlin-stdlib-1.8.22.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.8.0, expected version is 1.6.0.
e: C:/Users/Husamuldeen/.gradle/caches/transforms-3/8020430956ebf7f2e70e0169ef7f1774/transformed/jetified-kotlin-stdlib-1.8.22.jar!/META-INF/kotlin-stdlib.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/Husamuldeen/.gradle/caches/transforms-3/8020430956ebf7f2e70e0169ef7f1774/transformed/jetified-kotlin-stdlib-1.8.22.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.8.0, expected version is 1.6.0.
e: C:/Users/Husamuldeen/.gradle/caches/transforms-3/ac89cfd23cf522f48151b0c70f16f4ac/transformed/jetified-kotlin-stdlib-common-1.8.22.jar!/META-INF/kotlin-stdlib-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.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 2776 bytes (99.8% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:validateSigningRelease'.
> Keystore file 'E:AndroidStudioProjectsalatruqchikey.jks' not found for signing config 'release'.

* 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 33s
Running Gradle task 'assembleRelease'...                           94.0s

┌─ Flutter Fix ──────────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin.                                 │
│ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then update the  │
│ version number of the plugin with id "org.jetbrains.kotlin.android" in the plugins block of            │
│ E:AndroidStudioProjectsalatraqchyandroidsettings.gradle.                                           │
│                                                                                                        │
│ Alternatively (if your project was created before Flutter 3.19), update                                │
│ E:AndroidStudioProjectsalatraqchyandroidbuild.gradle                                               │
│ ext.kotlin_version = '<latest-version>'                                                                │
└────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Gradle task assembleRelease failed with exit code 1
PS E:AndroidStudioProjectsalatraqchy> 
PS E:AndroidStudioProjectsalatraqchy>
PS E:AndroidStudioProjectsalatraqchy>
PS E:AndroidStudioProjectsalatraqchy>
PS E:AndroidStudioProjectsalatraqchy> flutter build apk

Note: C:UsersHusamuldeenAppDataLocalPubCachehostedpub.devflutter_beep-1.0.0androidsrcmainjavacomgonoterflutter_beepFlutterBeepPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 2776 bytes (99.8% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:validateSigningRelease'.
> Keystore file 'E:AndroidStudioProjectsalatruqchikey.jks' not found for signing config 'release'.

* 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
Running Gradle task 'assembleRelease'...                           46.1s
Gradle task assembleRelease failed with exit code 1

it’s some thing that i never deal with before
please help
thank you

2

Answers


  1. try in build gradle

    allprojects {
        ext.kotlin_version = '1.6.0'\ add this line
        repositories {
            google()
            mavenCentral()
        }
    }
    
    Login or Signup to reply.
  2. The error coming from the keystore file what you’ve mentioned in your

    • android/app/build.gradle file

       signingConfigs {
       release {
           keyAlias keystoreProperties['keyAlias']
           keyPassword keystoreProperties['keyPassword']
           storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
           storePassword keystoreProperties['storePassword']
       }
      

    Please give a correct path of that jks file, it will build the apk successfully

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