<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                八、細節 1、打包步驟 1)debug 打包 1.調用assembleDebug 編譯得到一個debug 簽名的apk(old apk),這是基礎apk。 2.修改代碼、更新res 文件、so 等。 3.將old apk 按gradle 中的參數規則,重命名為指定名字,還是放在bakApk目錄下(該目錄可更改)。 4.調用tinkerPatchDebug 生成補丁包于/build/outputs/tinkerPatch/目錄(默認是patch_signed_7zip.apk)。 5.將補丁包復制到SD 卡目錄下(目錄可更改),在程序中調用打補丁方法,重啟app 即可實現熱修復。 2)release 打包步驟 1.調用assembleRelease 編譯得到一個release 簽名的apk(old apk),這是基礎apk,還有一個mapping 文件。 2.修改代碼、更新res 文件、so 等。 3.將old apk 與mapping 文件按gradle 中的參數規則,分別重命名為指定名字,還是放在bakApk 目錄下(該目錄可更改)。 4.調用tinkerPatchRelease 生成補丁包于/build/outputs/tinkerPatch/目錄(默認是patch_signed_7zip.apk)。 5.將補丁包復制到SD 卡目錄下(目錄可更改),在程序中調用打補丁方法,重啟app 即可實現熱修復。 因為調用tinker 的release 打包需要用到簽名文件的信息,所以還必須在app的build.gradle 中配置好簽名文件。 ``` android { ... signingConfigs { release { try { storeFile file("./keystore/release.keystore") storePassword "testres" keyAlias "testres" keyPassword "testres" } catch (ex) { throw new InvalidUserDataException(ex.toString()) } } debug { storeFile file("./keystore/debug.keystore") } } ... buildTypes { release { minifyEnabled true signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android.txt'), project.file('proguard-rules.pro') } debug { debuggable true minifyEnabled false signingConfig signingConfigs.debug } } } ``` ![](https://img.kancloud.cn/32/6e/326e50a53c624a83027b3495ce17463e_1013x486.jpg) 其實說白了,debug 與release 打包的差別,除了執行的命令不一樣之外,release 打包比debug 打包多用到2 個文件(mapping.txt、R.txt)。 2、使用tinker 的注意事項與發現 1.tinker 編譯時需要禁用instant run。 2.tinker 需要MultiDex。 3.上架前用assembleRelease 編譯得到的apk、mapping.txt、R.txt 這3 個文 件要備份好,制作補丁時會用到。 4.多個補丁包的版本一樣時,不影響打補丁(如:第一次補丁版本是1.0,第二 次補丁還是1.0 版本,是可以成功打上第二次補丁的)。 5.成功打上補丁后,補丁原文件會被刪除,故項目中不必擔心補丁原文件清理的 問題。 3、可能會遇到的錯誤 1)onLoadPatchListenerReceiveFail code 為-2 報錯原文如下: ``` receive a patch file: /storage/emulated/0/patch_signed_7zip.apk, file size:3604 patch loadReporter onLoadPatchListenerReceiveFail: patch receive fail: /storage/emulated/0/patch_signed_7zip.apk, code: -2 ``` 出現這種情況,請按如下兩步進行排查: 1.查看文件路徑是否正常。 2.查看清單文件中是否有添加SD 卡訪問權限。 2)onLoadPatchListenerReceiveFail code 為-24 報錯原文如下: ``` receive a patch file: /storage/emulated/0/patch_signed_7zip.apk, file size:3665 get platform:null patch loadReporter onLoadPatchListenerReceiveFail: patch receive fail: /storage/emulated/0/patch_signed_7zip.apk, code: -24 ``` 提示很明顯,Tinker 獲取不到platform 的值,請檢查在app 的build.gradle文件中是否有如下配置,這部分配置了Tinker 補丁包支持的平臺與版本號: ``` packageConfig { configField("platform", "all") configField("patchVersion", "1.0") } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看