You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the application first boots it is using assets and script sources pulled from the APK/IPA installation directory. When we reload we switch to script sources from a temporary directory but not the assets. On a hot-restart we also switch the asset directory.
To fix this:
Add a new service protocol RPC that tells the engine to look in a specific directory for assets. This is mostly implemented today by the existing _flutter.runInView RPC which takes an assetDirectory parameter.
@aam does this change with the new incremental kernel generator implementation? Since the sources are not pushed we should be able to switch to the assets directory right.
I don't think it changes with IKG. We still want to explicitly switch assets directory on hot reload by sending an RPC request(_flutter.setAssetDirectory , for example?) to flutter engine. Currently, only RPC request that is sent on hot reload is to _reloadSources to Dart VM to pick up updated sources(or incremental kernel file).
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.
Activity
johnmccutchan commentedon Apr 20, 2017
The issue here is:
When the application first boots it is using assets and script sources pulled from the APK/IPA installation directory. When we reload we switch to script sources from a temporary directory but not the assets. On a hot-restart we also switch the asset directory.
To fix this:
_flutter.runInViewRPC which takes anassetDirectoryparameter.a-siva commentedon Sep 28, 2017
@aam does this change with the new incremental kernel generator implementation? Since the sources are not pushed we should be able to switch to the assets directory right.
aam commentedon Nov 3, 2017
I don't think it changes with IKG. We still want to explicitly switch assets directory on hot reload by sending an RPC request(
_flutter.setAssetDirectory, for example?) to flutter engine. Currently, only RPC request that is sent on hot reload is to_reloadSourcesto Dart VM to pick up updated sources(or incremental kernel file).aam commentedon Nov 3, 2017
This can be address with #12872 and flutter-team-archive/engine#4323
Hixie commentedon Dec 20, 2017
Leaving in current milestone since "make hot reload trustworthy" is a priority.
github-actions commentedon Sep 4, 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 -vand a minimal reproduction of the issue.