Nuwa:熱修復你的 Android 應用

jopen 9年前發布 | 21K 次閱讀 Nuwa Android開發 移動開發
Nuwa,采用純Java實現,能夠熱修復你的Android應用。利用它來修復你的android應用程序,可以不需要發布一個新的APK到應用商店。

特性

  • Support both dalvik and art runtime.
  • Support productFlavor and buildType.
  • Support proguard and multidex.
  • Pure java implementation.

運行示例 

  1. inmasterbranch, run and install the app.

    it shows『hello world』.

  2. copy sample/build/outputs/nuwa dir to somewhere for later use.

    for example: /Users/jason/Documents/nuwa

  3. 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

  4. run following command to push patch.jar to sdcard.

    adb push sample/build/outputs/nuwa/qihoo/debug/patch.jar /sdcard/

  5. restart your application (kill the process).

    it shows『patch success』.

Integration

Get Gradle Plugin

  1. 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'
        }
    }
  2. 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'
    }

項目主頁:http://www.baiduhome.net/lib/view/home/1447378656882

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!