简体   繁体   English

添加flutter_email_sender插件后Flutter无法编译

[英]Flutter does not compile after adding flutter_email_sender plugin

I am trying to redirect my users to an email client so they can send an attachement i have created within my app. 我正在尝试将用户重定向到电子邮件客户端,以便他们可以发送我在我的应用程序中创建的附件。 However on adding flutter_email_sender to my pubspec.yaml my app no longer compiles. 但是,在将flutter_email_sender添加到我的pubspec.yaml时,我的应用程序不再编译。

I am getting the following error: 我收到以下错误: 错误

I have tried adding the line to my AndroidManifest with no success. 我尝试将行添加到我的AndroidManifest中,但没有成功。

"The prefix 'tools' for at tribute 'tools:replace' associated with an element type 'application' is not bound" “与元素类型“应用程序”关联的属性“ tools:replace”的前缀“ tools”未绑定”

The documentation says i should have compileSdkVersion 28 which i have. 文档说我应该拥有compileSdkVersion 28。

How do i resolve this error? 我该如何解决此错误?

You need to migrate to androidx . 您需要迁移到androidx Which means you need to update all packages that you added in your pubspec.yaml to ensure that they are compatible with androidx . 这意味着您需要更新在pubspec.yaml添加的所有软件包,以确保它们与androidx兼容。 So make sure that all your packages are up to date, then open the android project of your flutter app with android studio. 因此,请确保您所有的软件包都是最新的,然后使用android studio打开flutter应用程序的android项目。 Go to Refactor -> Migrate to AndroidX . 转到“ Refactor ->“ Migrate to AndroidX Then rebuild your project. 然后重建您的项目。 And you will be fine. 而且您会没事的。 Hope it helps! 希望能帮助到你!

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

相关问题 在flutter中添加Firebase身份验证插件后出现':app:transformDexArchiveWithExternalLibsDexMergerForDebug'错误 - ':app:transformDexArchiveWithExternalLibsDexMergerForDebug' error after adding firebase auth plugin in flutter Flutter App gradle 添加flutter_contact插件后构建失败 - Flutter App gradle build failing after adding flutter_contact plugin Flutter 将依赖项添加到 pubspec.yml 后,应用程序无法在 android 中编译 - Flutter app doesn´t compile in android after adding dependency to pubspec.yml Flutter 将 flutter 更新到 2.8.1 后编译代码时抛出错误 - Flutter throw error while compile code after update flutter to 2.8.1 在Flutter应用中添加image_picker插件后,Gradle Build失败 - Gradle Build failing after adding image_picker plugin in flutter app Flutter:使用barcode_scan插件后,Snackbar不显示 - Flutter: Snackbar does not show up after using barcode_scan plugin 将项目添加到列表 FLUTTER 后,ListView.builder 不显示项目 - ListView.builder does not show items after adding them to list FLUTTER 将 Firestore 插件添加到我的 flutter 应用程序时生成错误 - Build error when adding firestore plugin to my flutter application 使用EventChannel的Flutter插件 - Flutter plugin that uses an EventChannel Flutter插件manifestPlaceholders错误 - Flutter Plugin manifestPlaceholders error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM