当前位置:网站首页>flutter 混合开发 module 依赖
flutter 混合开发 module 依赖
2022-07-31 05:15:00 【为今天而努力】
一:创建android 工程。
二:创建flutter_libary

三:配置 flutter
1.工程对应的 build.gradle
maven 使用 aliyun 镜像,防止出现一些找不到问题。
allprojects {
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://storage.googleapis.com//download.flutter.io'}
}
}2.工程对应的 setting.gradle
setBinding(new Binding([gradle:this]))
//flutter目录
evaluate(new File(
settingsDir.parentFile,
'flutter_library/.android/include_flutter.groovy'
))new Binding([gradle:this]) 如果出错,标识确实对应的 jar【package groovy.lang.Binding;】
groovy-all-1.3-2.5.12.jar
我自己用的 gradle 版本为: 7.2-bin ,对应的文件目录,没有该文件
c\Users\user\.gradle\wrapper\dists\gradle-7.2-bin\2dnblmf4td7x66yl1d74lt32g\gradle-7.2\lib\
user --> 对应的自己的账户名称
处理方案:重其他版本查找。在..\gradle-6.7\lib\groovy-all-1.3-2.5.12.jar 找到该文件,拷贝致 gradle-7.2\lib\groovy-all-1.3-2.5.12.jar
需要重启android studio。
3.app 目录下的 build.gradle 增加
implementation project(':flutter')dependencies {
...
implementation project(':flutter')
}4.创建 activity : FlutterActivity【Java extends】
import io.flutter.embedding.android.FlutterActivity
class FlutterActivityTest : FlutterActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
}真机运行
边栏推荐
猜你喜欢

Linux modify MySQL database password

Eternal blue bug reappears

win11中利用IIS10搭建asp网站

05 【绑定样式 条件渲染 列表渲染】

gin框架学习-Casbin入门指南(ACL、RBAC、域内RBAC模型)

场效应管 | N-mos内部结构详解

Yuan prospect and four track of the universe
![[swagger close] The production environment closes the swagger method](/img/43/17be22626ba152b33beaf03f92fbec.png)
[swagger close] The production environment closes the swagger method

npm WARN config global `--global`, `--local` are deprecated. Use `--location解决方案

mysql password modification method in Linux (pro-test available)
随机推荐
sqlmap injection tutorial common commands
leetcode-1833. 雪糕的最大数量(排序+贪心)
[Elastic-Job source code analysis] - job listener
leetcode-每日一题1252. 奇数值单元格的数目(模拟优化)
数字取证autopsy工具用法
2021 Mianjing - Embrace Change
Build DVWA with phpstudy
PHP中abstract(抽象)、final(最终)和static(静态)原理与用法
The latest MySql installation teaching, very detailed
使用ps | egrep时过滤排除掉egrep自身
mac10.14中安装mysqldb
feign调用不通问题,JSON parse error Illegal character ((CTRL-CHAR, code 31)) only regular white space (r
sqlmap注入教程 常用指令
For penetration testing methods where the output point is a timestamp (take Oracle database as an example)
Linux modify MySQL database password
Regular Expression Basics
利用phpstudy搭建DVWA
leetcode-每日一题745. 前缀和后缀搜索(哈希和字典树)
(Crypto essential dry goods) Detailed analysis of the current NFT trading markets
DeFi Token in the project management