首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >颤振问题,其元数据的二进制版本为1.7.1,预期版本为1.5.1

颤振问题,其元数据的二进制版本为1.7.1,预期版本为1.5.1
EN

Stack Overflow用户
提问于 2022-09-16 19:54:52
回答 1查看 463关注 0票数 -1

这是我的错误--我不明白是什么问题,当我在构建apk时,我得到了这个错误。怎么修呢?

这是我的错误--我不明白是什么问题,当我在构建apk时,我得到了这个错误。怎么修呢?这是我的错误--我不明白是什么问题,当我在构建apk时,我得到了这个错误。怎么修呢?

代码语言:javascript
运行
复制
C:\flutter\bin\flutter.bat --no-color build apk

 Building with sound null safety 

Running Gradle task 'assembleRelease'...                        
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_sim_country_code-0.1.2\android\src\main\java\com\example\flutter_sim_country_code\FlutterSimCountryCodePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\google_sign_in_android-5.2.7\android\src\main\java\io\flutter\plugins\googlesignin\GoogleSignInPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Parameter format not correct -
e: D:/Global Lancers/cwc-flutter-app/build/sign_in_with_apple/.transforms/b2c3fc047a9d7267418e111f2de6a0d1/transformed/out/jars/classes.jar!/META-INF/sign_in_with_apple_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: D:/Global Lancers/cwc-flutter-app/build/better_player/.transforms/151bfc855fe976bf94ab40ad88e221e1/transformed/out/jars/classes.jar!/META-INF/better_player_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: D:/Global Lancers/cwc-flutter-app/build/wakelock/.transforms/8d1905fcae49b140f3094369d4419c90/transformed/out/jars/classes.jar!/META-INF/wakelock_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: D:/Global Lancers/cwc-flutter-app/build/audioplayers/.transforms/6631a095458426ecb5445e25a1402e45/transformed/out/jars/classes.jar!/META-INF/audioplayers_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: D:/Global Lancers/cwc-flutter-app/build/package_info_plus/.transforms/28be655d06f4aa25e98a201585f1263b/transformed/out/jars/classes.jar!/META-INF/package_info_plus_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: D:/Global Lancers/cwc-flutter-app/build/fluttertoast/.transforms/afa6af91d841e4bf71a23b32c52d89d4/transformed/out/jars/classes.jar!/META-INF/fluttertoast_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: D:/Global Lancers/cwc-flutter-app/build/stripe_android/.transforms/2bfe933eebc159364e880a45681bae73/transformed/out/jars/classes.jar!/META-INF/stripe_android_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: C:/Users/DELL/.gradle/caches/transforms-3/b3fa9517f1020cd75f3409be069b61c6/transformed/appcompat-1.5.0/jars/classes.jar!/META-INF/appcompat_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: C:/Users/DELL/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.7.0/362da0b4951ed79a6591743a7fddcfb8c73809f6/kotlin-stdlib-jdk8-1.7.0.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.7.1, expected version is 1.5.1.
e: C:/Users/DELL/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.7.10/1ef73fee66f45d52c67e2aca12fd945dbe0659bf/kotlin-stdlib-jdk7-1.7.10.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.7.1, expected version is 1.5.1.
e: C:/Users/DELL/.gradle/caches/transforms-3/00867bb6132ae3ba398fbf21ecff6845/transformed/jetified-core-ktx-1.9.0/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.7.1, expected version is 1.5.1.
e: C:/Users/DELL/.gradle/caches/transforms-3/9f94187b7d0d64c5f03acf766cbb58c7/transformed/core-1.9.0/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.7.1, expected version is 1.5.1.
e: C:/Users/DELL/.gradle/caches/transforms-3/403d294479ff5b9381ca5eb0849050cf/transformed/jetified-annotation-experimental-1.3.0/jars/classes.jar!/META-INF/annotation-experimental_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: C:/Users/DELL/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.7.10/d2abf9e77736acc4450dc4a3f707fa2c10f5099d/kotlin-stdlib-1.7.10.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.
e: C:/Users/DELL/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.7.10/bac80c520d0a9e3f3673bc2658c6ed02ef45a76a/kotlin-stdlib-common-1.7.10.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.7.1, expected version is 1.5.1.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':audioplayers:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
   > Android resource linking failed
     ERROR:C:\Users\DELL\.gradle\caches\transforms-3\9f94187b7d0d64c5f03acf766cbb58c7\transformed\core-1.9.0\res\values\values.xml:104:5-113:25: AAPT: error: resource android:attr/lStar not found.


* 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 23m 46s
Running Gradle task 'assembleRelease'...                         1451.2s

┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin.                       │
│ Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then │
│ update D:\Global Lancers\cwc-flutter-app\android\build.gradle:                               │
│ ext.kotlin_version = '<latest-version>'                                                      │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1

这是我的梯度建筑->

代码语言:javascript
运行
复制
android {
    compileSdkVersion 33


    kotlinOptions {
        jvmTarget = '1.8'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "org.mycwc"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        multiDexEnabled true
    }

--------------------------------


  ext.kotlin_version = '1.7.10' // latest version

    dependencies {
        classpath 'com.google.gms:google-services:4.3.10'
        classpath 'com.android.tools.build:gradle:7.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

    }
EN

回答 1

Stack Overflow用户

发布于 2022-09-17 13:56:33

按照所有其他答案中的建议,将ext.kotlin_version更新到最新版本不会修复错误。当我在Android中打开这个项目时,它建议更新gradle,并为我修复了错误。

现在我的build.gradle有了这些行:

代码语言:javascript
运行
复制
buildscript {
    ext.kotlin_version = '1.7.10'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.2.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73749754

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档