如何将Flutter项目迁移到androidx [英] How to migrate flutter project to androidx

查看:261
本文介绍了如何将Flutter项目迁移到androidx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将现有的flutter项目迁移到Android X?有什么利弊吗?

How to migrate existing flutter project to Android X ? Are there any pro and cons?

推荐答案

如果您打算使用对最新库进行重大更改的功能,则需要迁移到AndroidX.我个人遇到了这个问题, cloud_firestore 0.9.0 正如更改日志所述,它需要迁移到Android X.

You would require to migrate to Android X if you intend to use features that have breaking changes for the latest library. I personally faced this problem cloud_firestore 0.9.0 as the change log says, it required a migration to Android X.

您的Android应用位于项目的android目录中.首先使用Android Studio 3.2+打开android目录.然后重构>迁移到AndroidX .然后,将它们添加到android目录中的gradle.properties文件

Your Android app is in the android directory of the project. First open the android directory with Android Studio 3.2+. Then Refactor > Migrate to AndroidX. After that also add these to the gradle.properties file in the android directory

android.useAndroidX=true
android.enableJetifier=true

这篇关于如何将Flutter项目迁移到androidx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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