简体   繁体   English

Flutter-将lib Flutter添加到Project Android

[英]Flutter - Add lib Flutter to Project Android

I'm developing a project Android (size about 600Mb) on IDE Android Studio. 我正在IDE Android Studio上开发一个Android项目(大小约为600Mb)。 Now, I want to add Library Flutter to my Project. 现在,我想将Library Flutter添加到我的项目中。 But I did not find any way. 但是我没有找到任何办法。 Please help me with this problem. 请帮我解决这个问题。

I suppose you are trying to add flutter to an existing project, you can just embed a FlutterView into an existing android or ios project. 我想您正在尝试将FlutterView添加到现有项目中,您可以将FlutterView嵌入到现有android或ios项目中。 For switching between fullscreen android and flutter views, you can look into this example. 要在全屏Android视图和颤动视图之间切换,可以查看示例。

To have a part of your view using flutter, you can take a look at flutter view example here . 要使用flutter展示部分视图,可以在此处查看flutter view示例。

Hope that helped! 希望能有所帮助!

At the root of your project, look for the pubspec.yaml file. 在项目的根目录下,查找pubspec.yaml文件。

  • android 安卓
  • ios IOS
  • lib LIB
  • test pubspec.yaml 测试pubspec.yaml

in the part of dependencies, you will add the libraries that you want 在依赖项部分,您将添加所需的库

dependencies:
   google_maps_flutter: ^ 0.0.3 + 3
   url_launcher: ^ 4.0.3
   flutter:
     sdk: flutter

   # The following adds the Cupertino Icons font to your application.
   # Use with the CupertinoIcons class for iOS style icons.
   cupertino_icons: ^ 0.1.2
   http: any

Remember that the indentation is very important in this file 请记住,缩进在此文件中非常重要

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

相关问题 无法将依赖项添加到 flutter 中的 android 项目 - Not able to add dependency to android project in flutter 为 Flutter 项目添加 Android Run/Debug 配置 - Add Android Run/Debug configuration for Flutter project 无法在Android Studio for Flutter项目中添加依赖项 - Unable to add dependencies in Android Studio for Flutter project 如何将protobuf添加到flutter/kotlin android项目中 - How to add protobuf into flutter/kotlin android project 如何将内置在 aar 中的多个 flutter 模块添加到现有的 android 项目中? - how to add multiple flutter modules built into aar into an existing android project? 将flutter模块添加到android项目时无法触发onActivityResult - onActivityResult can't triggered when add flutter module to android project 在使用 Android Studio 创建的 Flutter 项目中添加 Realm 数据库 - Add Realm database in Flutter project created with Android Studio 我们可以将Flutter模块添加到现有的Android Studio项目中吗? - Can we add a Flutter module to an existing Android Studio project? 在Android项目崩溃的ViewPager中添加Flutter View / Fragment - Add Flutter View/Fragment inside ViewPager in Android project crash 在Flutter项目上创建Android库 - Create Android Library on Flutter project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM