任务“:app:checkReleaseDuplicateClasses”执行失败。扑

2024-04-29

请找到以下文件

1.应用程序/构建.gradle

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
    compileSdkVersion 30

    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 "com.example.mood_reader_demo"
        minSdkVersion 16
        targetSdkVersion 30
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        multiDexEnabled true
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
        }
    }
}

flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:multidex:1.0.3'
    implementation "com.google.firebase:firebase-auth:19.3.0"
    implementation 'com.google.android.gms:play-services-vision:20.0.0'
    implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
    implementation 'com.google.firebase:firebase-dynamic-links:19.0.0'
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'com.google.firebase:firebase-bom:25.12.0'
    implementation 'androidx.annotation:annotation:1.1.0'
    implementation "com.android.support:support-v4:27.1.1"
}

2. 安卓/build.gradle

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        maven {
    url "https://maven.google.com"
}
jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        maven {
    url "https://maven.google.com"
}
jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
  1. pubspec.yaml

    环境: SDK:">=2.7.0

    依赖项: 扑: sdk:颤动 得到:^4.1.4 图像选择器:^0.7.4 firebase_core:^1.0.3 firebase_ml_vision:^0.9.10 firebase_auth:^1.1.0

    库比蒂诺图标:^1.0.2

    开发依赖项: 颤振测试: sdk:颤动

    flutter:

    使用材料设计:true

4. Error

  • 什么地方出了错:

    任务“:app:checkReleaseDuplicateClasses”执行失败。

    执行 com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable 时发生故障 > 在模块 jetified-play-services-vision-20.0.0-runtime 中发现重复的类 com.google.android.gms.internal.vision.zze (com.google.android.gms:play-services-vision:20.0.0 ) 和 jetified-play-services-vision-common-19.1.0-runtime (com.google.android.gms:play-services-vision-common:19.1.0) 在模块 jetified-play-services-vision-20.0.0-runtime (com.google.android.gms:play-services-vision:20.0.0) 中发现重复的类 com.google.android.gms.internal.vision.zzf和 jetified-play-services-vision-common-19.1.0-runtime (com.google.android.gms:play-services-vision-common:19.1.0) 在模块 jetified-play-services-vision-20.0.0-runtime (com.google.android.gms:play-services-vision:20.0.0) 中发现重复的类 com.google.android.gms.internal.vision.zzg和 jetified-play-services-vision-common-19.1.0-runtime (com.google.android.gms:play-services-vision-common:19.1.0) 在模块 jetified-play-services-vision-20.0.0-runtime (com.google.android.gms:play-services-vision:20.0.0) 中发现重复的类 com.google.android.gms.internal.vision.zzh和 jetified-play-services-vision-common-19.1.0-runtime (com.google.android.gms:play-services-vision-common:19.1.0) 在模块 jetified-play-services-vision-20.0.0-runtime (com.google.android.gms:play-services-vision:20.0.0) 中发现重复的类 com.google.android.gms.internal.vision.zzi和 jetified-play-services-vision-common-19.1.0-runtime (com.google.android.gms:play-services-vision-common:19.1.0) 在模块 jetified-play-services-vision-20.0.0-runtime (com.google.android.gms:play-services-vision:20.0.0) 中发现重复的类 com.google.android.gms.internal.vision.zzv和 jetified-play-services-vision-common-19.1.0-runtime (com.google.android.gms:play-services-vision-common:19.1.0) 在模块 jetified-play-services-vision-20.0.0-runtime (com.google.android.gms:play-services-vision:20.0.0) 中发现重复的类 com.google.android.gms.internal.vision.zzw和 jetified-play-services-vision-common-19.1.0-runtime (com.google.android.gms:play-services-vision-common:19.1.0)

       Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
    
    • 尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。使用 --scan 运行以获得完整的见解。

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

    23 秒内构建失败 运行 Gradle 任务“assembleRelease”...
    运行 Gradle 任务“assembleRelease”...完成


我在 app/build.gradle 中做了以下更改

Removed

    implementation 'com.google.android.gms:play-services-vision:20.0.0
    implementation 'com.google.android.gms:play-services-vision:20.0.0'
    implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
    implementation 'com.google.firebase:firebase-dynamic-links:19.0.0'
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'com.google.firebase:firebase-bom:25.12.0'
    implementation 'androidx.annotation:annotation:1.1.0'
    implementation "com.android.support:support-v4:27.1.1"

另外,需要匹配 pubspec.yaml 中的依赖项

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

任务“:app:checkReleaseDuplicateClasses”执行失败。扑 的相关文章

  • Mailgun POST /messages API 总是抛出 401 禁止

    我正在尝试使用改造库在 Android 中发送 Mailgun POST messages API 请求 以下是改装要求 HTTP POSThttps api key xxx v3 sandboxxxx messages https api
  • 如何编辑 gradle 依赖项

    我正在开发一个 android 项目 该项目在我的 gradle 文件中使用以下依赖项 compile com mapzen on the road 1 1 1 我想编辑其中一个文件 以添加一些缺少的功能并为该项目做出贡献 如何下载该项目并
  • 在 Android 中将应用程序上下文保存到静态变量是否安全?

    我知道在 Android 上使用静态变量是相当危险的 特别是当您将它们引用到活动时 但是 如果我有一个扩展 Application 的类 我们称此类为 App 引用此类的实例是否安全 如果是这样 任何其他类对应用程序上下文进行任何类型的引用
  • 方法断点可能会大大减慢调试速度

    每当向方法声明行添加断点 在 Intellij IDEA 或 Android Studio 中 时 都会出现一个弹出窗口 方法断点可能会大大减慢调试速度 为什么会这样戏剧性地减慢调试速度 是我的问题吗 将断点放在函数的第一行有什么不同 Th
  • OpenCV InRange 参数

    我在 Android 上使用 OpenCV 来实时查找特定颜色的圆圈 我的第一步是仅保留与我正在寻找的定义颜色相对应的像素 在本例中为红色或绿色 示例图像 https i stack imgur com CIozU jpg 为此 我正在使用
  • 如何检测 Google Play 上是否有我的应用程序的更新? [复制]

    这个问题在这里已经有答案了 有没有办法以编程方式检查 Google Play 上我的应用程序是否有更新 以便通知用户 我知道 android google play 有自动通知 但我想使用我自己的通知 弹出消息来更新可用性 有点像 Vibe
  • Locale.getDefault().getCountry() 返回空字符串

    我正在尝试使用国家 地区代码获取用户语言 例如en US es es 但是当我使用Locale getDefault getCountry 它返回空字符串 虽然它给了我正确的语言Locale getDefault getLanguage N
  • 如何在 Android 上的 HttpPost 中发送 unicode 字符

    我试图在我的应用程序中允许多语言支持 这会发出 HTTP post 来上传新消息 我需要做什么才能支持日语和其他非拉丁语语言 我的代码目前看起来像这样 note the msg string is a JSON message by the
  • 当参数具有默认值时,为什么无法使用导航组件将参数传递给片段?

    我正在使用导航组件 但我不明白为什么如果定义了参数 则将参数传递给下面的方法时会出现错误 我正在使用 SafeArgs 只有当我为此参数定义默认值时才会出现此错误 有人可以解释一下为什么会发生这种情况以及如何解决它吗 这是导航图的部分代码
  • 如何覆盖日期选择器的高度和宽度以填充父布局

    我有一个活动包含一个日期选择器 我想设置DatePicker适合屏幕 我试过这个答案 https stackoverflow com questions 6674667 how to customize date pickers width
  • 当应用程序未运行时如何堆叠 Firebase Cloud Messaging 通知?

    我在用Firebase Cloud Messaging将推送通知从我的服务器发送到我的 Android 应用程序 当应用程序运行时 通知是stacked因为我将它们设置为我的一个组FirebaseMessagingService 这很好 但
  • Android:如何监控WiFi信号强度

    当信号强度发生变化时我会收到通知 我尝试创建以下方法并在 onCreate 中调用它 private void initializeWiFiListener Log i TAG executing initializeWiFiListene
  • 模拟器:进程已完成,退出代码为 134(被信号 6:SIGABRT 中断)

    我最近刚刚开始在 Mac 上下载 Android Studio 版本 3 0 1 但收到以下错误 模拟器 进程已完成 退出代码为 134 被信号 6 SIGABRT 中断 我按照 Android Studio 教程操作并能够运行模拟器 但在
  • Android:如何使视图增长以填充可用空间?

    这看起来很简单 但我不知道该怎么做 我有一个带有 EditText 和两个 ImageButtons 的水平布局 我希望 ImageButtons 具有固定大小 并且 EditText 占据布局中的剩余空间 如何才能做到这一点
  • 带有空白白屏的 WebView

    我在 DialogFragment 中有一个 webview 它使用以下方式显示文档和 PDF它可以进行几次尝试 但如果用户尝试频繁打开和关闭对话框 webview 将显示空白屏幕 我已经尝试了所有的线程link1 https stacko
  • 如何使用 Dart 构建枚举? [复制]

    这个问题在这里已经有答案了 Dart 语言没有枚举 还没有 至少在语言功能出现之前 构建枚举的正确或惯用的方法是什么 Dart 现在支持枚举 这个答案的其余部分适用于 Dart 1 8 请使用 Dart 对枚举的正式支持 在另一个答案中进行
  • Google Android Drive api 在已安装版本上登录失败

    我开发了一个使用 GoogleDrive api 的 Android 应用程序 当处于调试状态或运行调试版本时 应用程序 工作正常 并正确验证附加的谷歌帐户 等 当我构建发行版本时 使用我的签名密钥 并且 安装apk文件 当我运行时 Goo
  • 使用支持库中的 BottomSheet 时如何调暗背景?

    怎样才能让背景像显示的那样变暗here https material design storage googleapis com publish material v 8 material ext publish 0Bzhp5Z4wHba3
  • 是否可以将 Cypress e2e 测试与 firebase auth 项目结合使用?

    我正在探索 Cypress 进行 e2e 测试 看起来是很棒的软件 问题在于身份验证 Cypress 文档解释了为什么使用 UI 非常糟糕here https docs cypress io guides getting started t
  • 绘制大位图时 nSyncAndDrawFrame 速度极慢

    我想用多个大位图优化视差滚动视图 在我的 Nexus 5 上 一切都很顺利 Traceview 转储如下所示 doFrame 方法大约需要 18 毫秒才能完成 但是 当使用我的 Nexus 7 或 Android 6 模拟器 Genymot

随机推荐

  • 我应该将 PHP include/require 语句放在 HTML 中的什么位置?

    我在文件中创建了一个 PHP 类 现在我想在 HTML 页面中使用它 我应该把它放在哪里require or includeHTML 页面内的声明 有没有表现在 HTML 的开头或结尾加载它之间的区别 还是根本没有区别 应该是在 PHP 脚
  • 我可以从 React Native 项目中删除 tvOS 吗?

    Eventually I will be submitting a react native app to the app store but the app will only run on iOS not tvOS Will I be
  • 如何将 pymongo.cursor.Cursor 转换为字典?

    我正在使用 pymongo 查询一个区域内的所有项目 实际上是查询地图上一个区域内的所有场馆 我用了db command SON 在搜索球形区域之前 它可以返回一本字典 字典中有一个名为results其中包含场馆 现在我需要在一个正方形区域
  • 在 ReportLab 中向画布元素添加超链接的最简单方法是什么?

    我正在使用 ReportLab 使用 Python 制作 pdf 我想向画布添加一个形状 并让该形状充当超链接 使以下示例中的矩形链接到 google com 的最简单方法是什么 from reportlab pdfgen import c
  • 处理变量的范围:内部循环

    作为一名直接进入 Go 的 JS 开发者 如果长度超过commits不止一个 我没有太多时间来完成这件事 而且我搜索的时间比我希望的要长 关于如何重组它或让它发挥作用有什么想法吗 case github PushPayload push p
  • VSCode:activeTextEditor编码

    有什么方法可以在我的扩展代码中获取当前文档编码 位于底部栏中 就像是vscode window activeTextEditor encoding 这似乎不可能 由于几乎不可能证明是否定的 因此本答案的其余部分记录了我的探索内容 字符串 e
  • PhantomJS CPU(核心)受限吗?

    我开始做一些基于并行浏览器的测试 并想看看在达到 100 CPU 之前我可以在 EC2 大型机器上并行运行多少个浏览器 我正在使用 JMeter webdriver 插件来实际运行浏览器 对于 FireFox 实际上每个 CPU 核心有 1
  • 使用 Mongodb 和 Node.js 在一个页面中处理多个表单

    我的登录和注册表单都在同一页面上 我已经指定了两种不同的路由来发布数据 但是当我点击注册表单末尾的注册按钮时 它会保存登录表单输入 没有 我看了这个问题 多种表单 一张处理页面 https stackoverflow com questio
  • 在word文档的标题中添加图片时出现问题

    我正在Word文档的标题中添加图片 它显示图像的框架并显示 当前无法显示图像 如果我将文本添加到标题 它会显示文本 如果我在文档正文中添加图像 它也会显示图像 获取图像也是如此 它在标题上显示文本 但没有图像 我的支票快用完了 有人可以建议
  • iOS - Xcode 错误:由于系统完整性保护而无法附加到进程

    当我从 XCode 运行按钮运行应用程序共享扩展 然后尝试共享文件时 XCode 经常显示以下错误 有人知道是什么原因造成的吗 错误 由于系统完整性保护 无法附加到进程 系统完整性保护 SIP 又名无根 是 OS X 10 11 中的一项新
  • 巨大下拉列表的替代方案(24,000 多个项目)

    在我的管理部分中 当我编辑项目时 我必须将每个项目附加到父项目 我有超过 24 000 个父项目的列表 这些项目按字母顺序列在下拉列表 音乐艺术家列表 中 在下拉菜单中列出所有这些项目的编辑页面有 2MB 对于使用旧机器的人来说 它的速度非
  • 由尾随空格分隔的 Cobol 字符串

    WORKING STORAGE FIRST STRING PIC X 15 VALUE SPACES SECOND STRING PIC X 15 VALUE SPACES OUTPUT STRING PIC X 31 VALUE SPAC
  • Mac/iPhone:有没有一种方法可以在不使用 Objective-C 的情况下获取线程标识符?

    有没有一种方法可以获取当前正在运行的线程的任何类型的线程标识符 而无需借助 Objective C 的 NSThread 我正在改进我们的自定义调试跟踪系统以正确处理多个线程 对于跟踪输出的每一行 我想打印线程 ID 或线程名称 线程可以通
  • Hamcrest 与 MockMvc:检查键是否存在,但值可能为空

    我正在使用 MockMvc 进行一些测试 我想验证 JSON 响应的结构 具体来说 我想确保属性的键存在 并且值是某种类型或为 null keyToNull null This may be null or a String keyToSt
  • Play 2.0 应用程序的依赖关系管理

    我们小组对基于 JVM 的开发有些陌生 我们正在开发由许多其他库组成的应用程序 我们发现 Play 框架对于开发 Web 应用程序非常有吸引力 该框架很棒 但我们本地开发的库的依赖管理有点令人烦恼 我们正在使用 Play 2 0 的 RC2
  • (响应式)表格宽度不适合 ios safari 上 iframe 内的容器

    我在 iPhone 的 safari 上的 iframe 内渲染表格时遇到问题 这是示例 http jsfiddle net qb86ojms http jsfiddle net qb86ojms 如果您在桌面浏览器 较小的尺寸 或 and
  • Java:使用类型参数访问私有构造函数

    这是后续这个关于java私有构造函数的问题 https stackoverflow com questions 2599440 accessing the private constructor 假设我有以下课程 class Foo
  • IE toDataUrl() 安全错误

    我需要从画布上获取图片 因此我从 Amazon S3 获取图像 我在那里启用了跨源资源共享 CORS 并将 croseOrigin 属性 匿名 设置为 img 它适用于 Chrome 和FireFox 但在 IE 上 我通过调用 toDat
  • 为什么这段代码会抛出 InvalidOperationException?

    我认为我的代码应该使ViewBag test财产等于 No Match 但它会抛出一个InvalidOperationException 为什么是这样 string str Hello1 Hello Hello2 string anothe
  • 任务“:app:checkReleaseDuplicateClasses”执行失败。扑

    请找到以下文件 1 应用程序 构建 gradle def localProperties new Properties def localPropertiesFile rootProject file local properties if