公众号 | 掘金 | 知乎 | CSDN | 简书 | 思否 | 哔哩哔哩 | 今日头条 |
---|---|---|---|---|---|---|---|
我的Android开源之旅 | 点我 | 点我 | 点我 | 点我 | 点我 | 点我 | 点我 |
-
爱码士,擅长设计模式,架构设计,移动设备通讯,App快捷开发。
-
专注Android移动开发技术,提高开发的效率!
欢迎打开微信扫码下方的二维码,关注我的微信公众号:我的Android开源之旅
The project of the empty template with Flutter has built the basic framework to realize the functions of internationalization, theme peeling, login and registration, etc.(Flutter空壳模板工程,已搭建基础框架,实现国际化、主题换肤、登录注册、自动路由注册等功能,可在此基础上简单修改实现自己的应用功能)
Home Page: https://github.com/xuexiangjys/flutter_template/wiki
License: Apache License 2.0
uniSDK地址参考:
https://nativesupport.dcloud.net.cn/README
后端方案:JAP+授权登录
https://gitee.com/fujieid/jap-ids-demo/issues/I3YQ8Z
作者大大,你有qq群吗😄
Launching lib/main.dart on macOS in debug mode...
lib/main.dart:1
../.pub-cache/hosted/pub.flutter-io.cn/extended_image-1.6.0/lib/src/extended_image.dart:785:44: Error: No named parameter with the name 'nullOk'.
_invertColors = MediaQuery.of(context, nullOk: true)?.invertColors ??
^^^^^^
../flutter/packages/flutter/lib/src/widgets/media_query.dart:818:25: Context: Found this candidate, but the arguments don't match.
static MediaQueryData of(BuildContext context) {
^^
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
** BUILD FAILED **
Exception: Build process failed
Exited (sigterm)
作者辛苦了。
1、请问i18n是用哪个插件完成的?能不能添加一下增加语言、增加翻译后如果生成更新文件?
2、建议再出一个增强版。新项目一般都还需要 相机、定位、扫码、指纹 这四个权限,如果能增加到增强版中去,配置好Android和iOS的插件权限,这个项目一定大货喜欢。
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It is being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration
to migrate your project. You may also pass the --ignore-deprecation flag to
ignore this check and continue with the deprecated v1 embedding. However,
the v1 Android embedding will be removed in future versions of Flutter.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The detected reason was:
C:\flutter_template-master\android\app\src\main\AndroidManifest.xml uses android:name="io.flutter.app.FutterApplication"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Build failed due to use of deprecated Android v1 embedding.
更改后代码
// 获取当前用户的APP语言配置Locale类,如果为null,则语言跟随系统语言
Locale getLocale() {
if (_locale == null) return null;
if (_locale.indexOf("_") > 0) {
var t = _locale.split("_");
return Locale(t[0], t[1]);
} else {
return null;
}
}
代码中为字符判断,会报错。
easy_localization: https://pub.dev/packages/easy_localization
dokit: https://pub.dev/packages/dokit
riverpod: https://pub.dev/packages/riverpod
vs provider
https://pub.dev/packages/floor
db: sqlite
登录页面提交的 showDialog 能放在http 统一显示消失吗
showDialog 参数里面的 context 现在还没有办法解决吗?
Exception in thread "main" java.util.zip.ZipException: zip END header not found
at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1567)
at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1462)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1469)
at java.base/java.util.zip.ZipFile$Source.(ZipFile.java:1274)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1237)
at java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:727)
at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:844)
at java.base/java.util.zip.ZipFile.(ZipFile.java:247)
at java.base/java.util.zip.ZipFile.(ZipFile.java:177)
at java.base/java.util.zip.ZipFile.(ZipFile.java:191)
at org.gradle.wrapper.Install.unzip(Install.java:214)
at org.gradle.wrapper.Install.access$600(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:74)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Exception: Gradle task assembleDebug failed with exit code 1
类似flutter_screenutil这种
/D:/service/flutter/.pub-cache/hosted/pub.flutter-io.cn/extended_image-1.6.0/lib/src/extended_image.dart:785:44: Error: No named parameter with the name 'nullOk'.
_invertColors = MediaQuery.of(context, nullOk: true)?.invertColors ??
^^^^^^
/D:/service/flutter/packages/flutter/lib/src/widgets/media_query.dart:818:25: Context: Found this candidate, but the arguments don't match.
static MediaQueryData of(BuildContext context) {
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It is being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration
to migrate your project. You may also pass the --ignore-deprecation flag to
ignore this check and continue with the deprecated v1 embedding. However,
the v1 Android embedding will be removed in future versions of Flutter.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The detected reason was:
/Users/meichao/DeveloperTools/FlutterProjects/flutter_template/android/app/src/main/AndroidManifest.xml uses android:name="io.flutter.app.FutterApplication"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Build failed due to use of deprecated Android v1 embedding.
可以将auto_route更新至2.0.1么 这个版本有大的支持
Navigator也从1升级到了2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
━━━━━━━━━━━━━━━━━━
Warning
────────────────────────────────────────────────────────────
──────────────────
Your Flutter application is created using an older version
of the Android
embedding. It is being deprecated in favor of Android
embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration
to migrate your project. You may also pass the
--ignore-deprecation flag to
ignore this check and continue with the deprecated v1
embedding. However,
the v1 Android embedding will be removed in future versions
of Flutter.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
━━━━━━━━━━━━━━━━━━
The detected reason was:
/Users/jiashaoying/github_projects/flutter_template/androi
d/app/src/main/AndroidManifest.xml uses
android:name="io.flutter.app.FutterApplication"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
━━━━━━━━━━━━━━━━━━
Running "flutter pub get" in flutter_template... 5.1s
This app is using a deprecated version of the Android
embedding.
To avoid unexpected runtime failures, or future build
failures, try to migrate this app to the V2 embedding.
Take a look at the docs for migrating an app:
https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-A
ndroid-projects
The plugin package_info_plus
requires your app to be
migrated to the Android embedding v2. Follow the steps on
https://flutter.dev/go/android-project-migration and re-run
this command.
最新版本。
同意协议之后,进入登录页面。点击返回键无法退出app
请问是环境配置不正确的原因,还是版本相关的问题
运行flutter run 时,报错信息如下
fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
请问您有遇到过类似的情况吗?有的话麻烦和我说一下解决办法,谢谢
flutter create .
也可以。The plugins flutter_webview_plugin, image_picker_saver
use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. Otherwise, consider removing them since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.
lib/init/default_app.dart GlobalEasyRefreshLocalizations.delegate 抛错,提示不存在
environment:
sdk: ">=2.7.0 <3.0.0"
Text(
value.nickName != null
? value.nickName
: I18n.of(context).title,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20,
color: Colors.white,
),
)
昵称过长会像素溢出,请用expand
包裹下
希望大哥一直更新,一直维护完善下去
尽快支持Null Safety。支持dart 2.12以上的版本。
在app_init.dart文件里
// 构建错误信息
static FlutterErrorDetails makeDetails(Object obj, StackTrace stack) {
return FlutterErrorDetails();//这句话有问题
}
编译报错如下:
The parameter 'exception' is required.
应该怎么改呢
The plugins flutter_webview_plugin, image_picker_saver
use a deprecated version
of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these
plugins support the Android V2 embedding. Otherwise, consider removing them since a
future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the
V2 embedding: https://flutter.dev/go/android-plugin-migration.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.