简体   繁体   English

Flutter - 在 android 上执行构建

[英]Flutter - Executing build on android

I have a question when I run flutter run on my project I have the following error, how can I solve this:我有一个问题,当我在我的项目上运行 flutter 时出现以下错误,我该如何解决:

Error:错误:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'flutter_full_pdf_viewer'.
> Failed to find target with hash string 'android-28' in: /usr/local/share/android-sdk

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


Exception: The plugin flutter_full_pdf_viewer could not be built due to the issue
above.

Try to clean your project and then run.尝试清理您的项目,然后运行。

flutter clean
flutter pub cache repair

The exception states everything clearly例外清楚地说明了一切

Failed to find the target with hash string 'android-28' in: /usr/local/share/android-sdk无法在 /usr/local/share/android-sdk 中找到带有 hash 字符串“android-28”的目标

Solution解决方案

Open the SDK manager and update your Android SDK.打开 SDK 管理器并更新您的 Android SDK。

Here is CLI for launching and executing intended commands from Offical Android Site是用于从官方 Android 站点启动和执行预期命令的 CLI

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM