【问题标题】:Execution failed for task ':ai_barcode:compileDebugKotlin'. A failure occurred while executing org.jetbrains.kotlin.compilerRunner任务 \':ai_barcode:compileDebugKotlin\' 执行失败。执行 org.jetbrains.kotlin.compilerRunner 时发生故障
【发布时间】:2022-08-19 01:34:48
【问题描述】:
e: /Users/ddo/development/flutter/.pub-cache/hosted/pub.dartlang.org/ai_barcode-2.1.0/android/src/main/kotlin/com/air/ai_barcode/AndroidCreatorViewFactory.kt: (15, 1): Class \'AndroidCreatorViewFactory\' is not abstract and does not implement abstract base class member public abstract fun create(p0: Context?, p1: Int, p2: Any?): PlatformView defined in io.flutter.plugin.platform.PlatformViewFactory
e: /Users/ddo/development/flutter/.pub-cache/hosted/pub.dartlang.org/ai_barcode-2.1.0/android/src/main/kotlin/com/air/ai_barcode/AndroidCreatorViewFactory.kt: (17, 5): \'create\' overrides nothing
e: /Users/ddo/development/flutter/.pub-cache/hosted/pub.dartlang.org/ai_barcode-2.1.0/android/src/main/kotlin/com/air/ai_barcode/AndroidScannerViewFactory.kt: (14, 1): Class \'AndroidScannerViewFactory\' is not abstract and does not implement abstract base class member public abstract fun create(p0: Context?, p1: Int, p2: Any?): PlatformView defined in io.flutter.plugin.platform.PlatformViewFactory
e: /Users/ddo/development/flutter/.pub-cache/hosted/pub.dartlang.org/ai_barcode-2.1.0/android/src/main/kotlin/com/air/ai_barcode/AndroidScannerViewFactory.kt: (16, 5): \'create\' overrides nothing

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task \':ai_barcode:compileDebugKotlin\'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details
  • 尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。

  • https://help.gradle.org 获得更多帮助

\'\'\'

  • flutter clean - flutter pub get 没有解决我的问题
  • 使用 ====> flutter run 发布完整的错误日志——详细

标签: java flutter kotlin dart gradle


【解决方案1】:

步骤1

去你的构建.gradle文件在你的根目录中安卓目录

第2步

将您的 Kotlin_version 升级到

ext.kotlin_version = '1.6.10

buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        mavenCentral()
    }

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

第 3 步

按照命令重建您的项目

扑干净

颤振酒吧得到

扑跑

【讨论】:

    猜你喜欢
    • 2021-11-30
    • 1970-01-01
    • 1970-01-01
    • 2021-03-04
    • 2019-12-27
    • 2020-09-19
    • 1970-01-01
    • 2022-08-21
    • 1970-01-01
    相关资源
    最近更新 更多