Skip to content
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

[Add2App] Release app doesn't display the flutter view #81350

Closed
Limy1992 opened this issue Apr 28, 2021 · 4 comments · Fixed by flutter/samples#790
Closed

[Add2App] Release app doesn't display the flutter view #81350

Limy1992 opened this issue Apr 28, 2021 · 4 comments · Fixed by flutter/samples#790
Labels
a: existing-apps Integration with existing apps via the add-to-app flow a: release Challenges faced when attempting to productionize an app engine flutter/engine repository. See also e: labels. found in release: 2.0 Found to occur in 2.0 found in release: 2.3 Found to occur in 2.3 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-android Android applications specifically r: fixed Issue is closed as already fixed in a newer version

Comments

@Limy1992
Copy link

Limy1992 commented Apr 28, 2021

demo : https://github.com/flutter/samples/tree/master/add_to_app/android_view

2021-04-28 10:00:28.609 E: [ERROR:flutter/shell/common/shell.cc(242)] Dart Unhandled Exception: NoSuchMethodError: No top-level getter 'showCell' declared.
    Receiver: top-level
    Tried calling: showCell, stack trace: #0      NoSuchMethodError._throwNew (dart:core-patch/errors_patch.dart:212)
2021-04-28 10:00:28.609 E: [ERROR:flutter/runtime/dart_isolate.cc(699)] Could not resolve main entrypoint function.
2021-04-28 10:00:28.609 E: [ERROR:flutter/runtime/dart_isolate.cc(190)] Could not run the run main Dart entrypoint.
2021-04-28 10:00:28.611 E: [ERROR:flutter/runtime/runtime_controller.cc(401)] Could not create root isolate.
2021-04-28 10:00:28.611 E: [ERROR:flutter/shell/common/shell.cc(571)] Could not launch engine with configuration.
2021-04-28 10:00:28.787 E: win=Window{65277b9 u0 Splash Screen com.xq.testandroidflutter EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.0.5, on Microsoft Windows [Version 10.0.19042.928], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] IntelliJ IDEA Ultimate Edition (version 2020.3)
[√] Connected device (3 available)

! Doctor found issues in 1 category.
@Limy1992 Limy1992 changed the title The debug mode can display the flitter view, but the release mode does not display the flitter view The debug mode can display the flutter view, but the release mode does not display the flutter view Apr 28, 2021
@Limy1992 Limy1992 changed the title The debug mode can display the flutter view, but the release mode does not display the flutter view 【Adding a Flutter View to an Android app】 The debug mode can display the flutter view, but the release mode does not display the flutter view Apr 28, 2021
@TahaTesser TahaTesser added the in triage Presently being triaged by the triage team label Apr 28, 2021
@TahaTesser
Copy link
Member

Hi @Limy1992
Thanks for filing the issue! I can confirm the issue on the stable and master

Reproduced on the following channels and modes

reproduced stable master
debug
release APK

Preview

debug release APK
Logcat
2021-04-28 13:49:47.513 3725-8175/? D/IOLIMITER: enter the circle of wait for signal, waiting
2021-04-28 13:49:47.518 2722-18795/? D/AudioTrack: ClientUid 1000 AudioTrack::stop 
2021-04-28 13:49:47.567 13054-18782/? E/flutter: [ERROR:flutter/shell/common/shell.cc(242)] Dart Unhandled Exception: NoSuchMethodError: No top-level getter 'showCell' declared.
    Receiver: top-level
    Tried calling: showCell, stack trace: #0      NoSuchMethodError._throwNew (dart:core-patch/errors_patch.dart:212)
2021-04-28 13:49:47.567 13054-18782/? E/flutter: [ERROR:flutter/runtime/dart_isolate.cc(699)] Could not resolve main entrypoint function.
2021-04-28 13:49:47.568 13054-18782/? E/flutter: [ERROR:flutter/runtime/dart_isolate.cc(190)] Could not run the run main Dart entrypoint.
2021-04-28 13:49:47.568 13054-18782/? E/flutter: [ERROR:flutter/runtime/runtime_controller.cc(401)] Could not create root isolate.
2021-04-28 13:49:47.568 13054-18782/? E/flutter: [ERROR:flutter/shell/common/shell.cc(571)] Could not launch engine with configuration.
2021-04-28 13:49:47.569 13054-13054/? D/OpScreenModeManager: setRefreshRate parent io.flutter.embedding.android.FlutterView{a672e70 VFE...... ......ID 0,0-1080,450} parent width 1080 parent height 450 mRatio 1.2
2021-04-28 13:49:47.569 13054-13054/? D/OpScreenModeManager: setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{e7e0735 V.E...... ......ID 0,0-1080,450} viewRate 0 width 1080 height 450
2021-04-28 13:49:47.571 13054-13054/? D/OpScreenModeManager: setRefreshRate parent io.flutter.embedding.android.FlutterView{a672e70 VFE...... ........ 0,0-1080,450} parent width 1080 parent height 450 mRatio 1.2
2021-04-28 13:49:47.571 13054-13054/? D/OpScreenModeManager: setRefreshRate view io.flutter.embedding.android.FlutterSurfaceView{e7e0735 V.E...... ........ 0,0-1080,450} viewRate 0 width 1080 height 450
2021-04-28 13:49:47.578 13054-18776/? D/evercode.triag: Successfully load libgui-plugin.so, this=0x7e6dd7c298
flutter doctor -v
[✓] Flutter (Channel stable, 2.0.5, on Microsoft Windows [Version 10.0.19042.928], locale en-US)
    • Flutter version 2.0.5 at C:\Users\Taha\Code\flutter_stable
    • Framework revision adc687823a (12 days ago), 2021-04-16 09:40:20 -0700
    • Engine revision b09f014e96
    • Dart version 2.12.3

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Taha\Code\SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\Taha\Code\SDK
    • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.4)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.9.31205.134
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 4.1.0)
    • Android Studio at C:\Users\Taha\Code\android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[✓] IntelliJ IDEA Community Edition (version 2021.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.55.2)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.21.0

[✓] Connected device (5 available)
    • IN2011 (mobile)                    • c9d8ee0c      • android-arm64  • Android 11 (API 30)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 10 (API 29) (emulator)
    • Windows (desktop)                  • windows       • windows-x64    • Microsoft Windows [Version 10.0.19042.928]
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 90.0.4430.93
    • Edge (web)                         • edge          • web-javascript • Microsoft Edge 90.0.818.46

! Doctor found issues in 1 category.
[✓] Flutter (Channel master, 2.3.0-1.0.pre.143, on Microsoft Windows [Version 10.0.19042.928], locale en-US)
    • Flutter version 2.3.0-1.0.pre.143 at C:\Users\Taha\Code\flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision aecd5e0302 (7 hours ago), 2021-04-28 00:53:57 -0300
    • Engine revision 92ef7b59c8
    • Dart version 2.14.0 (build 2.14.0-48.0.dev)

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Taha\Code\SDK
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\Taha\Code\SDK
    • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.4)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.9.31205.134
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 4.1.0)
    • Android Studio at C:\Users\Taha\Code\android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[✓] IntelliJ IDEA Community Edition (version 2021.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.55.2)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.21.0

[✓] Connected device (5 available)
    • IN2011 (mobile)                    • c9d8ee0c      • android-arm64  • Android 11 (API 30)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 10 (API 29) (emulator)
    • Windows (desktop)                  • windows       • windows-x64    • Microsoft Windows [Version 10.0.19042.928]
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 90.0.4430.93
    • Edge (web)                         • edge          • web-javascript • Microsoft Edge 90.0.818.46

! Doctor found issues in 1 category.

@TahaTesser TahaTesser changed the title 【Adding a Flutter View to an Android app】 The debug mode can display the flutter view, but the release mode does not display the flutter view [Add2App] Release app doesn't display the flutter view Apr 28, 2021
@TahaTesser TahaTesser added a: existing-apps Integration with existing apps via the add-to-app flow engine flutter/engine repository. See also e: labels. found in release: 2.0 Found to occur in 2.0 found in release: 2.3 Found to occur in 2.3 has reproducible steps The issue has been confirmed reproducible and is ready to work on platform-android Android applications specifically a: release Challenges faced when attempting to productionize an app and removed in triage Presently being triaged by the triage team labels Apr 28, 2021
@chinmaygarde
Copy link
Member

@gaaclarke The showCell function needs a vm:entry-point pragma as it is getting tree shaken away in AOT modes. It looks like you were the author of the sample so I pinged you. But if someone else is owning the these now, please feel free to redirect.

@Limy1992
Copy link
Author

Thanks

@TahaTesser TahaTesser added the r: fixed Issue is closed as already fixed in a newer version label May 27, 2021
@github-actions
Copy link

github-actions bot commented Aug 1, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
joshpeterson30489 added a commit to joshpeterson30489/flutter_maps_firestore that referenced this issue Sep 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: existing-apps Integration with existing apps via the add-to-app flow a: release Challenges faced when attempting to productionize an app engine flutter/engine repository. See also e: labels. found in release: 2.0 Found to occur in 2.0 found in release: 2.3 Found to occur in 2.3 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-android Android applications specifically r: fixed Issue is closed as already fixed in a newer version
Projects
None yet
3 participants