Tencent / tinker

Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.
Other
17.14k stars 3.33k forks source link

补丁包下载失败 #1382

Open RoronoaZoro7 opened 4 years ago

RoronoaZoro7 commented 4 years ago

手机型号:华为荣耀9X

手机系统版本:如:Android 9.0

tinker版本: provided("com.tinkerpatch.tinker:tinker-android-anno:1.9.14.6") compile("com.tinkerpatch.sdk:tinkerpatch-android-sdk:1.2.14.6")

gradle版本:如:3.0.1

是否使用热更新SDK:使用TinkerPatch SDK

出现场景:补丁包全量下发,点击事件使用强制检查更新 TinkerPatch.with().fetchPatchUpdate(true);的时候出现以下日志的错误。

堆栈/日志: 04-22 15:14:42.650 13198-13198/com.example.administrator.tinkerdemo V/AudioManager: playSoundEffect effectType: 0 04-22 15:14:42.650 13198-13198/com.example.administrator.tinkerdemo V/AudioManager: querySoundEffectsEnabled... 04-22 15:14:42.658 13198-13198/com.example.administrator.tinkerdemo W/Tinker.ClientImpl: [retryAllReportFails], there is no fail report, just return 04-22 15:14:42.667 13198-13198/com.example.administrator.tinkerdemo I/Tinker.UrlConnectionFetcher: loadData from url: http://q.tinkerpatch.com/b9cfbf0d65da89ff/1.6.0?d=d851bfc2-b55e-4290-950c-b9d7e2258fff&v=1587539682665, method:GET, body:null 04-22 15:14:42.684 13198-13245/com.example.administrator.tinkerdemo W/Tinker.PatchRequestCallback: TinkerPatchRequestCallback onPatchSyncFail error: java.net.ConnectException: Failed to connect to q.tinkerpatch.com/127.0.0.1:80 04-22 15:14:42.684 13198-13245/com.example.administrator.tinkerdemo E/Tinker.PatchRequestCallback: Plz make sure you fill the correct appVersion and appKey in tinkerpatch.gradle. Or create the correspond project in tinkerpatch.com

注: 发布补丁包后无法下载补丁包,appVersion appKey 均已填写 image

reflectApplication = true Application代码: image

zhengzhuoxing commented 4 years ago

我在数据流量下可以下载成功,在WiFi环境下载失败,

RoronoaZoro7 commented 4 years ago

我在数据流量下可以下载成功,在WiFi环境下载失败,

刚使用mi8 honor9X 流量/wifi下使用,都一样还是不行

Geek-Spirit commented 4 years ago

TinkerPatch.with().fetchDynamicConfig(new ConfigRequestCallback() { @Override public void onSuccess(HashMap<String, String> hashMap) { final Set<Map.Entry<String, String>> entries = hashMap.entrySet(); for (Map.Entry<String, String> entry : entries) { final String key = entry.getKey(); final String value = entry.getValue(); Log.i("TinkerPatch", "key == " + key + " value == " + value); } }

        @Override
        public void onFail(Exception e) {
            Log.e("TinkerPatch", e.getMessage() != null ? e.getMessage() : "message is null");
        }
    }, true);

E/TinkerPatch: Failed to connect to q.tinkerpatch.com/127.0.0.1:80 我打印出这个错误,你的问题解决了么?

nishizawa23 commented 4 years ago

同样问题,不用TinkerPatch.with().fetchPatchUpdate(true);就可以下载