flutter

flutter 报错 Could not resolve io.flutter:flutter_embedding_release

 我是升级flutter后,所有项目都报错,先贴解决办法: flutter\packages\flutter_tools\gradle 目录下 aar_init_script.gradle resolve_dependencies.gradle flutter.gradle 以上三个文件中将 http://download.flutter.io 替换为: https://storage.googleapis.com/download.flutter.io   报错如下: flutter build apk The plugin `flutter_forbidshot` is built using an older version of the Android plugin API which assumes that it's running in a full-Flutter environment. It may have undefined behaviors when Flutter is integrated into an e...

flask模板使用layui前端框架语法冲突

 大致报错如下吧. {{ 很容易冲突.  File "D:\soft\Python27\lib\site-packages\jinja2\environment.py", line 804, in _load_template template = self.loader.load(self, name, globals) File "D:\soft\Python27\lib\site-packages\jinja2\loaders.py", line 125, in load code = environment.compile(source, name, filename) File "D:\soft\Python27\lib\site-packages\jinja2\environment.py", line 591, in compile self.handle_exception(exc_info, source_hint=source_hint) File "D:\sof...

运行卡在flutter packages get: running…

F5调试的时候 卡在 flutter packages get: running... 好久,看输出日志 应该是官网北墙,官方也注意到了这个问题. 提供了中国的镜像,我们只需新增系统变量 PUB_HOSTED_URL 和 FLUTTER_STORAGE_BASE_URL 两个参数,并分别设置URL 即可. PUB_HOSTED_URL=https://pub.flutter-io.cn FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn 设置完毕执行: flutter doctor   下面是linux操作办法 export PUB_HOSTED_URL=https://pub.flutter-io.cn export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn git clone -b dev https://github.com/flutter/flutter.git export PATH=&qu...

D8: Invoke-customs are only supported starting with Android O (–min-api 26)

 在\android\app\build.gradle中添加以下内容: compileOptions { sourceCompatibility JavaVersion.VERSION_1_8     targetCompatibility JavaVersion.VERSION_1_8 } 如下: android { compileSdkVersion 27 lintOptions { disable 'InvalidPackage' } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.xyvod" minSdkVersion 16 targetSdkVersion 27 versionCode flutterVersionCod...

Flutter 集成 Python

  This example shows how to run python script from flutter. This example is based on starcore_for_flutter, which enables flutter calls other scripts. Step by Step 1. Create flutter project $ flutter create flutter_python 2. Add dependency package “starflut” and assets folder Edit “pubspec.yaml” dependencies: flutter: sdk: flutter starflut: any ... # To add assets to your application, add an assets section, like this: a...

flutter_webview_plugin 插件的安装与引用

flutter 引用 webview 插件步骤 1. 添加插件依赖 编辑 pubspec.yaml 文件,在dependencies:下增加一行: flutter_webview_plugin: ^0.3.0+2 例子: dependencies: flutter_webview_plugin: ^0.3.0+2 2. 安装 执行下面命令安装插件,如果是 vscode 保存文件后会自动安装 $ flutter packages get 3.引入插件 文件头部增加 import 'package:flutter_webview_plugin/flutter_webview_plugin.dart'; 参考网址: https://pub.dartlang.org/packages/flutter_webview_plugin#-installing-tab-