构建失败并出现异常 - 任务“:cloud_firestore:parseDebugLocalResources”执行失败
Posted
技术标签:
【中文标题】构建失败并出现异常 - 任务“:cloud_firestore:parseDebugLocalResources”执行失败【英文标题】:Build failed with an exception - Execution failed for task ':cloud_firestore:parseDebugLocalResources' 【发布时间】:2021-05-01 00:18:57 【问题描述】:我在 android studio 代码上运行 Flutter 项目,当我运行代码时,我收到以下错误消息:
Launching lib\main.dart on sdk gphone x86 arm in debug mode...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':cloud_firestore:parseDebugLocalResources'.
> Could not resolve all files for configuration ':cloud_firestore:androidApis'.
> Failed to transform android.jar to match attributes artifactType=android-platform-attr, org.gradle.libraryelements=jar, org.gradle.usage=java-r
untime.
> Execution failed for PlatformAttrTransform: C:\Users\aayus\AppData\Local\Android\sdk\platforms\android-29\android.jar.
> error in opening zip file
* 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 57s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 59.6s
Exception: Gradle task assembleDebug failed with exit code 1
这个错误已经出现好几天了,我还没有找到合适的解决方案 有人可以帮忙吗? 提前致谢
【问题讨论】:
我已经找到了一些可能的解决方案来解决这个问题,你可以试试this community answer #1和this community answer #2吗? 【参考方案1】:在 build.gradle 上试试这个
minSdkVersion 16
compiledSdkVersion 28
targetSdkVersion 29
【讨论】:
以上是关于构建失败并出现异常 - 任务“:cloud_firestore:parseDebugLocalResources”执行失败的主要内容,如果未能解决你的问题,请参考以下文章
FAILURE:构建失败,出现异常 flutter error 。帮我
Flutter:FAILURE:构建失败,出现异常无法创建任务':app:compileFlutterBuildDebug'。必须提供 Flutter 源码目录