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

flutter run --release 模式下,无法进行热更新 #53

Closed
justdoitgo opened this issue Jan 21, 2022 · 4 comments
Closed

flutter run --release 模式下,无法进行热更新 #53

justdoitgo opened this issue Jan 21, 2022 · 4 comments

Comments

@justdoitgo
Copy link

flutter run 调试模式是可以进行热更新的,
代码是用的
https://github.com/rhymelph/r_upgrade/tree/master/example

我的环境
Flutter version 2.2.0 at F:\flutter\flutter2.2.0
• Framework revision b22742018b (8 months ago), 2021-05-14 19:12:57 -0700
• Engine revision a9d88a4d18
• Dart version 2.13.0
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn

@justdoitgo
Copy link
Author

增量更新,在调试模式下运行报错

V/AudioManager(16318): querySoundEffectsEnabled...
D/r_upgrade.Increment(16318): 合成失败:
W/System.err(16318): java.io.IOException: Permission denied
W/System.err(16318): at java.io.UnixFileSystem.createFileExclusively0(Native Method)
W/System.err(16318): at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:317)
W/System.err(16318): at java.io.File.createNewFile(File.java:1008)
W/System.err(16318): at com.example.r_upgrade.common.IncrementUpgradeManager.mixinAndGetNewApk(IncrementUpgradeManager.java:38)
W/System.err(16318): at com.example.r_upgrade.common.GenerateAndInstallAsyncTask.doInBackground(GenerateAndInstallAsyncTask.java:63)
W/System.err(16318): at com.example.r_upgrade.common.GenerateAndInstallAsyncTask.doInBackground(GenerateAndInstallAsyncTask.java:22)
W/System.err(16318): at android.os.AsyncTask$3.call(AsyncTask.java:389)
W/System.err(16318): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
W/System.err(16318): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:292)
W/System.err(16318): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W/System.err(16318): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W/System.err(16318): at java.lang.Thread.run(Thread.java:929)
D/r_upgrade.AsyncTask(16318): 合成成功,新的安装包路径:null

@rhymelph
Copy link
Owner

release模式下是静态编译,无法进行热更新

@rhymelph
Copy link
Owner

增量更新需要做差分包 , 不能用调试模式测试,具体查看文档

@07ami
Copy link

07ami commented Jun 4, 2024

release模式下是静态编译,无法进行热更新

那这个热更新就没有任何意义啊,你应该把这句话也写到文档里才是

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants