Nuwa:热修复你的 Android 应用
Nuwa,采用纯Java实现,能够热修复你的Android应用。利用它来修复你的android应用程序,可以不需要发布一个新的APK到应用商店。
特性
- Support both dalvik and art runtime.
- Support productFlavor and buildType.
- Support proguard and multidex.
- Pure java implementation.
运行示例
-
inmasterbranch, run and install the app.
it shows『hello world』.
-
copy sample/build/outputs/nuwa dir to somewhere for later use.
for example: /Users/jason/Documents/nuwa
-
change tobugfixbranch, run the following command in terminal to generate patch.jar.
./gradlew clean nuwaQihooDebugPatch -P NuwaDir=/Users/jason/Documents/nuwa
java verison must be same using android studio and terminal
-
run following command to push patch.jar to sdcard.
adb push sample/build/outputs/nuwa/qihoo/debug/patch.jar /sdcard/
-
restart your application (kill the process).
it shows『patch success』.
Integration
Get Gradle Plugin
-
add following to the build.gradle of your root project.
classpath 'cn.jiajixin.nuwa:gradle:1.2.1'
build.gradle maybe look like this:
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.2.3' classpath 'cn.jiajixin.nuwa:gradle:1.2.1' } }
- add following to your build.gradle: >apply plugin: "cn.jiajixin.nuwa"
Get Nuwa SDK
-
gradle dependency:
dependencies { compile 'cn.jiajixin.nuwa:nuwa:1.0.0' }
本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
转载本站原创文章,请注明出处,并保留原始链接、图片水印。
本站是一个以用户分享为主的开源技术平台,欢迎各类分享!