当我尝试运行我的 flutter 应用程序时出现此错误:
警告:将新的 ns http://schemas.android.com/repository/android/common/02映射到旧的 ns http://schemas.android.com/repository/android/common/01 警告:映射新的 ns http:// /schemas.android.com/repository/android/generic/02到旧 ns http://schemas.android.com/repository/android/generic/01 警告:映射新 ns http://schemas.android.com/sdk /android/repo/addon2/02到旧 ns http://schemas.android.com/sdk/android/repo/addon2/01 警告:映射新 ns http://schemas.android.com/sdk/android/repo /repository2/02到旧的 ns http://schemas.android.com/sdk/android/repo/repository2/01 警告:映射新的 ns http://schemas.android.com/sdk/android/repo/sys-img2 /02到旧 NS http://schemas.android.com/sdk/android/repo/sys-img2/01
失败:构建失败并出现异常。
- 出了什么问题:任务“:app:checkDebugDuplicateClasses”执行失败。
执行 com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable 时发生故障 在模块 jetified-exoplayer-core-2.17.0-runtime (com.google. android.exoplayer:exoplayer-core:2.17.0) 和 jetified-exoplayer-ui-2.15.0-runtime (com.google.android.exoplayer:exoplayer-ui:2.15.0)
请参阅文档了解如何修复依赖项解析错误。
- 尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。使用 --scan 运行以获得完整的见解。
- 在https://help.gradle.org获取更多帮助
1m 47s 内构建失败异常:Gradle 任务 assembleDebug 失败,退出代码为 1
我该如何修复这个错误?以下是我的 build.gradle 文件:
应用程序\build.gradle
def localProperties = new Properties()
def localPropertiesFile = …
Run Code Online (Sandbox Code Playgroud)