[英]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.