android - 带有 Flutter 的 Rive(flare) 文件显示并在 QEMU Android 模拟器上运行良好,但不会在真实 Android 设备中的内置 APK 上显示
问题描述
颤振医生:
[√] Flutter (Channel master, v1.14.7-pre.24, on Microsoft Windows [versão 10.0.18363.592], locale pt-BR)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including the following components:
MSBuild
MSVC v142 - VS 2019 C++ x64/x86 build tools
- If there are multiple build tool versions available, install the latest
Windows 10 SDK (10.0.17763.0)
[√] Android Studio (version 3.5)
[√] VS Code (version 1.41.1)
[√] Connected device (3 available)
我在 pubspec.yalm 上明确声明了两个耀斑对象:
flutter:
uses-material-design: true
assets:
- assets/ericodigosSplash.gif
- assets/ic_launcher.png
- assets/flares/interruptorCircadiano.flr
- assets/flares/space_vaporwave.flr
我已经尝试过flare_flutter: ^2.0.1
并且smart_flare
依赖,都不适用于内置的 apk。
我在两个不同的 android 设备上进行了测试。flr (rive) 文件仅显示在模拟器上。
解决方案
在运行之前flutter build apk
运行:flutter build bundle
它的工作原理!
推荐阅读
- python - AttributeError:在 keras 中创建模型时,“张量”对象没有属性“_keras_shape”
- internet-explorer - VBScript,打开 IE,有时 visible=true 将其带到前台,有时不
- node.js - Mongoose 找到已删除的文档
- php - 如何将 Ajax Success 函数变量调用到其他函数中
- node.js - 数据映射应该发生在哪里?
- javascript - 在 Javascript 中创建用于定位元素的 for 循环
- meteor - 流星,使用 xlsx-populate 写入 xlsx 文件
- c# - 如何解析 Json 文件的原语?
- cross-domain - CORS 错误,仅在 HTTP/2 中
- scala - 如何将 DataFrame 的所有列(使用嵌套的 StructTypes)转换为 Spark 中的字符串