Flutter:调试构建成功,但发布产生错误 [英] Flutter: Debug build successful but release gives error

查看:69
本文介绍了Flutter:调试构建成功,但发布产生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将Flutter更新到1.12.13 + hotfix.8之后,Flutter在发行版本中给出了奇怪的错误,但在调试版本中工作得很好

After updating the flutter to 1.12.13+hotfix.8, Flutter gives strange errors on release build, but works perfectly fine in debug build

错误

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'intent'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or 
by setting the sdk.dir path in your project's local properties file at 
'/Users/niyantras/tools/flutter/.pub-cache/hosted/pub.dartlang.org/intent- 
1.1.0/android/local.properties'.

* 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 1s

扑扑医生:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.15.3 19D76, locale en-GB)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.42.0)
[✓] Connected device (1 available)

• No issues found! 

有人可以帮我弄清楚,谢谢您的帮助。

Can someone help me in figuring out, thanks for the help.

推荐答案


flutter clean

flutter clean

flutter pub缓存修复

flutter pub cache repair

让我知道问题是否仍然存在

let me know if the issue persists

在此处检查,这是已解决的抖动问题

检查 compilesdkversion 文件夹中的所有位置,并将其与 android / app / build.gradle

Check for compilesdkversion everywhere in the folder and match it with one in android/app/build.gradle

这篇关于Flutter:调试构建成功,但发布产生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆