Xposed
module hot loader, new code can be applied without restarting the phone every time during development
-
Clone
HotLoader
library project to the project directorygit clone https://github.com/jrsen/Xposed-HotLoader.git libhotloader
-
Edit the project
settings.gradle
and addinclude':libhotloader'
to add thehotloader
library to the project -
Edit the main project
build.grade
and add dependencyimplementation project(path:':libhotloader')
-
Edit the main project
assets/xposed_init
file to replace the original content withcom.kaisar.xposed.hotloader.HotLoader
, and place your Xposed initialization class inAndroidManifest.xml
application tag like this e.g:<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.kaisar.hotloader.example"> <application > <meta-data android:name="xposed_init" android:value="your.xposed.init.class" /> </application> </manifest>
-
Restart the phone to activate the hot reload function
-
The new code does not take effect after updating the module?
All changes will be applied after the target process restarts, you can manually kill the target process to apply the new module