首页 > 解决方案 > Flutter :: 相机插件问题 :: 应用程序无法在 android 中运行,但适用于 iOS

问题描述

我是 Flutter 开发的新手,基本上我是一名 ios 开发人员,

当我在为配置文件更新屏幕做扑扑的新项目时,我添加了一个用于依赖项的相机插件,以让相机第三方在 ios android 中使用两者。因此,当它使用 ios 应用程序运行顺利时没有显示错误,但 android 应用程序显示一些错误如下

 FAILURE: Build failed with an exception.

 * What went wrong:
 Task 'assembleAarRelease' not found in root project 'camera'.

 * Try:
 Run gradlew tasks to get a list of available tasks. 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

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

谁能告诉这个问题的解决方案是什么?

标签: flutterandroid-camera

解决方案


您是否尝试过将build.gradle中的 compileSdkVersion 更改为更高版本,例如从 28 到 29 或 30?


推荐阅读