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

无法使用instant run #16

Open
jasonlee3652 opened this issue Mar 10, 2018 · 8 comments
Open

无法使用instant run #16

jasonlee3652 opened this issue Mar 10, 2018 · 8 comments

Comments

@jasonlee3652
Copy link

项目当前的热更新环境配置是正确的,已经发布上线。我设置tinkerpatchSupport{tinkerEnable = false},想禁用热更新,来使用instant run,发现不行,必须得把tinker的相关的依赖和代码全部注释才可以使用instant run,有简单点的配置来禁用tinkerpatch,而且还能够使用instant run 吗

@simpleton
Copy link
Contributor

@jasonlee3652
Copy link
Author

不是这个问题,已经设置false了。

<application> <service android:name="com.tencent.tinker.lib.service.TinkerPatchService" android:exported="false" android:process=":patch" /> <service android:name="com.tencent.tinker.lib.service.TinkerPatchService$InnerService" android:exported="false" android:process=":patch" /> <service android:name="com.tencent.tinker.lib.service.DefaultTinkerResultService" android:exported="false" /> </application>

应该是android:process="xxx"属性影响到了instant run,一直提示有多个进程在运行,需要重启app。BuildConfig.TINKER_ENABLE,我直接用false替换,还是不行。

@jasonlee3652
Copy link
Author

Instant Run applied code changes and restarted the app.The app was restarted since it uses multiple processes.配置TinkerPatch后一直提示这个,TINKER_ENABLE = fasle,设置这个也不行,注释TinkerPatch相关的所有代码才可以使用Instant Run

@simpleton
Copy link
Contributor

Instant Run applied code changes and restarted the app.The app was restarted since it uses multiple processes.

这不是看起来已经生效了么?

@jasonlee3652
Copy link
Author

这个会导致app重启,我想直接在当前界面刷新的效果。

@jasonlee3652
Copy link
Author

multiple processes,会导致app重启,感觉instant run会检查AndroidManifest.xml里面有没有android:process这个属性,如果有会重启,如果没有就可以直接刷新当前界面,而不是重启,这是我测试后的感想。我另外开了一个项目,测试后得到的结果。

@simpleton
Copy link
Contributor

@jasonlee3652 确实如此,instant run对于多进程的app都会默认重启来保证所有进程都是最新的代码。

@shwenzhang
Copy link
Contributor

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