Git Product home page Git Product logo

Comments (8)

simpleton avatar simpleton commented on July 26, 2024

可以参照如下示例:
https://github.com/TinkerPatch/tinkerpatch-easy-sample/blob/master/app/src/main/java/com/tinkerpatch/easy_sample/SampleApplication.java#L80

from tinkerpatch-easy-sample.

jasonlee3652 avatar jasonlee3652 commented on July 26, 2024

不是这个问题,已经设置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替换,还是不行。

from tinkerpatch-easy-sample.

jasonlee3652 avatar jasonlee3652 commented on July 26, 2024

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

from tinkerpatch-easy-sample.

simpleton avatar simpleton commented on July 26, 2024
Instant Run applied code changes and restarted the app.The app was restarted since it uses multiple processes.

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

from tinkerpatch-easy-sample.

jasonlee3652 avatar jasonlee3652 commented on July 26, 2024

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

from tinkerpatch-easy-sample.

jasonlee3652 avatar jasonlee3652 commented on July 26, 2024

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

from tinkerpatch-easy-sample.

simpleton avatar simpleton commented on July 26, 2024

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

from tinkerpatch-easy-sample.

shwenzhang avatar shwenzhang commented on July 26, 2024

可以在外面再包一层,类似https://github.com/Tencent/tinker/blob/master/tinker-sample-android/app/build.gradle

from tinkerpatch-easy-sample.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.