Android 的 hotfix 库 Amigo

码农软件 · 软件分类 · 手机开发工具 · 2019-04-30 10:12:06

软件介绍

Amigo,是一个Android 平台的hotfix库,由饿了么公司开源。

用法

在project 的build.gradle 中

   dependencies {
     classpath 'me.ele:amigo:0.0.5'
   }

在module 的build.gradle 中

   apply plugin: 'me.ele.amigo'

就这样轻松的集成了Amigo。

生效补丁包

补丁包生效有两种方式可以选择:

  • 稍后生效补丁包

    如果不想立即生效而是用户第二次打开App 时才打入补丁包,第二次打开时就会自动生效。可以通过这个方法

    File hotfixApk = Amigo.getHotfixApk(context);FileUtils.copyFile(yourApkFile, hotfixApk);Amigo.workLater(context);Amigo.workLater(context, apkFile);
  • 立即生效补丁包

    如果想要补丁包立即生效,调用以下两个方法之一,App 会立即重启,并且打入补丁包。

    Amigo.work(context);
    Amigo.work(context, apkFile);

删除补丁包

如果需要删除掉已经下好的补丁包,可以通过这个方法

Amigo.clear(context);

提示:如果apk 发生了变化,Amigo 会自动清除之前的apk。

相关阅读:

https://github.com/eleme/Amigo/wiki

https://github.com/WeMobileDev/article/blob/master/%E5%BE%AE%E4%BF%A1Android%E7%83%AD%E8%A1%A5%E4%B8%81%E5%AE%9E%E8%B7%B5%E6%BC%94%E8%BF%9B%E4%B9%8B%E8%B7%AF.md

本文地址:https://www.codercto.com/soft/d/4701.html

Machine Learning in Action

Machine Learning in Action

Peter Harrington / Manning Publications / 2012-4-19 / GBP 29.99

It's been said that data is the new "dirt"—the raw material from which and on which you build the structures of the modern world. And like dirt, data can seem like a limitless, undifferentiated mass. ......一起来看看 《Machine Learning in Action》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具