openwebf / webf

Build flutter apps with HTML/CSS and JavaScript.
https://openwebf.com/
Apache License 2.0
1.66k stars 121 forks source link

在android 14上运行报错,example里面的bundle.html页面没加载出来 #672

Closed jellyfish9 closed 4 weeks ago

jellyfish9 commented 1 month ago

Affected version

0.16.2

Flutter versions

3.24.3

No same issues found.

Steps to Reproduce

编译环境:IntelliJ IDEA 2024.1.7 windows 11 gradle 8.7 运行系统: android 14

Code example

main.dart: class FirstPageState extends State { late WebFController controller;

@override void didChangeDependencies() { super.didChangeDependencies(); controller = WebFController( context, devToolsService: ChromeDevToolsService(), ); controller.preload(WebFBundle.fromUrl('assets:assets/bundle.html')); }

控制台错误: D/EGL_emulation( 4199): app_time_stats: avg=20952.19ms min=2.60ms max=439856.56ms count=21 W/WindowOnBackDispatcher( 4199): OnBackInvokedCallback is not enabled for the application. W/WindowOnBackDispatcher( 4199): Set 'android:enableOnBackInvokedCallback="true"' in the application manifest. D/EGL_emulation( 4199): app_time_stats: avg=96.37ms min=1.49ms max=2354.19ms count=27

======== Exception caught by widgets library ======================================================= The following RangeError was thrown while finalizing the widget tree: RangeError (length): Invalid value: Valid value range is empty: -1

When the exception was thrown, this was the stack:

0 List.[] (dart:core-patch/growable_array.dart)

1 List.removeLast (dart:core-patch/growable_array.dart:337:20)

2 _WebFRenderObjectElement.unmount (package:webf/src/widget/webf.dart:547:35)

3 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2077:13)

4 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:2075:7)

5 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5669:14)

6 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2073:13)

7 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:2075:7)

8 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6886:14)

9 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2073:13)

10 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:2075:7)

11 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5669:14)

12 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2073:13)

13 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:2075:7)

14 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:6886:14)

15 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2073:13)

16 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:2075:7)

17 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5669:14)

18 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:2073:13)

19 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:2075:7)

20 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:5669:14)

Expected results

能显示bundle.html网页内容

Actual results

现在为空白 153032

andycall commented 4 weeks ago

预构建产物内没有x64模拟器的版本,所以运行不起来

andycall commented 3 weeks ago

已支持从 C/C++ 源代码直接构建 android 项目,所有版本的 android 虚拟机都已支持