无法在flutter中同步build.gradle中的依赖项 [英] Not able to sync dependency in build.gradle in flutter

查看:477
本文介绍了无法在flutter中同步build.gradle中的依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用一些本机库.我正在使用以下依赖关系

I want to use some native library. and I am using below dependnecy

实现'com.google.android.gms:play-services-vision:10.+'

implementation 'com.google.android.gms:play-services-vision:10.+'

在flutter项目的build.gradle中.

in build.gradle in flutter project.

我将如何同步该依赖关系.请帮帮我!

How I will sync that dependency. Please help me!

推荐答案

如果您正在使用Android Studio进行Flutter开发,请右键单击Flutter项目中的android文件夹.选择"Flutter"->在Android Studio中打开Android模块".

If you're using Android Studio for Flutter development, right click on the android folder in your Flutter project. Select "Flutter" -> "Open Android Module in Android Studio".

只需启动Android Studio并直接打开Android(子)项目.

Simply start Android Studio and open the Android (sub)project directly.

无论如何,一旦在Android Studio中打开了Android项目,就可以在build.gradle中进行更改.编辑器将告诉您同步.否则,只需执行构建即可.之后,您将可以使用您的Android类进行导入.

In any case, once the Android project is opened in Android Studio, you can make changes in your build.gradle. The editor will tell you to sync. Otherwise simply execute a build. Afterwards you will be able to import use your Android classes.

这篇关于无法在flutter中同步build.gradle中的依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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