-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
可以加载打包到android_asset目录内的文件吗? #211
Comments
loadUrl 目前只支持了远程地址, 需要支持 |
Widget 侧可以传入 bundlePath 来指定 |
现在可以用个临时办法:先读取 flutter assets 里面的文件,然后将纯文本传给 Kraken https://flutter.dev/docs/development/ui/assets-and-images#loading-flutter-assets-in-android |
Assign to myself. |
Closed
移动到这里 #232 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
把js bundle放到android assets目录下提示无法加载
flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: Unable to load asset: file:///android_asset/app.js
#0 PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:225:7)
#1 AssetsBundle.resolve (package:kraken/src/launcher/bundle.dart:171:38)
#2 KrakenBundle.getBundle (package:kraken/src/launcher/bundle.dart:61:20)
#3 KrakenController.loadBundle (package:kraken/src/launcher/controller.dart:655:36)
#4 launch (package:kraken/src/launcher/launcher.dart:37:20)
#5 main (package:kraken_sdk_module/main.dart:4:3)
#6 _runMainZoned.. (dart:ui/hooks.dart:231:25)
#7 _rootRun (dart:async/zone.dart:1190:13)
#8 _CustomZone.run (dart:async/zone.dart:1093:19)
#9 _runZoned (dart:async/zone.dart:1630:10)
#10 runZonedGuarded (dart:async/zone.dart:1618:12)
#11 _runMainZoned. (dart:ui/hooks.dart:223:5)
#12 _startIsolate. (dart:isolate-patch/isolate_patch.dart:301:19)
#13 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
The text was updated successfully, but these errors were encountered: