我在 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
这个错误已经出现好几天了,我还没有找到合适的解决方案 有人可以帮忙吗? 提前致谢
答案 0 :(得分:0)
在 build.gradle 上试试这个
minSdkVersion 16
compiledSdkVersion 28
targetSdkVersion 29