0

Flutter Open an AndroidView and then return, how to destroy the original view? I use flutter's route to jump to a new page. This page embeds an AndroidView. When I return to the top left corner, I can return to the previous page correctly, but I find that in the native code, the life of the native page. The cycle will not execute, so it won't be correct onDestroy(), which will cause the app to crash when I click the home button after opening the AndroidView page again. So how do you let the native code execute its lifecycle when it returns?

long
  • 327
  • 3
  • 14
  • please add some code what you tried. – Viren V Varasadiya Oct 17 '18 at 05:47
  • I created a simple example, if you can [download](https://github.com/huang-weilong/flutter_test_plugin) it, when I show the native view and exit, the corresponding life-cycle function in the fluttertextview.java file will not execute. I printed some content in the function and did not execute. – long Oct 18 '18 at 07:10

0 Answers0