tinkerpatch / tinkerpatch-sdk Goto Github PK
View Code? Open in Web Editor NEWTinkerPatch SDK
Home Page: http://tinkerpatch.com
License: MIT License
TinkerPatch SDK
Home Page: http://tinkerpatch.com
License: MIT License
11-28 14:51:05.999 17597-17597/com.cdyzrs.golf E/ActivityThread: Failed to find provider info for com.tinker.debug.debugprovider
11-28 14:51:07.059 17693-17693/com.cdyzrs.golf:channel E/ActivityThread: Failed to find provider info for com.tinker.debug.debugprovider
11-28 14:51:09.889 17597-17930/com.cdyzrs.golf E/Tinker.ClientImpl: tinker server sync respond:{"e":1}
手机型号 三星 9006
E/Tinker.SampleUncaughtExHandler: uncaughtException:Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
合成补丁时异常,错误码 -2,请问是什么原因引起的,发生类次的异常我们有办法定位具体原因吗?
如果我既想加固APP,又想整合TinkerPatch,有什么解决方案呢?如果我使用1.7.5版本的tinker可以吗?
我在 log 中看到请求的地址是 http://q.tinkerpatch.com/dev/c2e0bbf76178d909/1.0.0-alpha.1%40f7345d6_armv7?d=0cb6d8c9-8820-4c6f-8f4b-08c7a4fb4c6b&v=1489039486847 ,所以 version 应该是 1.0.0-alpha.1@f7345d6_armv7
;可是在后台添加这个名字的时候发现被截断成了 1.0.0-alpha.1@f7345d
(而且没有警告),并且替换成这个后访问 URL 则没有问题。
我觉得后端没必要限制 version 的长度(至少没必要这么小,255 字符之类的比较可靠),这样开发者也可以有足够多的信息来区分版本。希望您能够修复这个问题。
如题,tinkerpatch-gradle-plugin是不是没有开源呢?
NullPointerException
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5364)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1528)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference
at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:164)
at com.alibaba.sdk.android.feedback.impl.FeedbackAPI.initToid(Unknown Source)
at com.alibaba.sdk.android.feedback.impl.FeedbackAPI.basicInitProcess(Unknown Source)
at com.alibaba.sdk.android.feedback.impl.FeedbackAPI.initAnnoy(Unknown Source)
at com.scrat.test.TsApp.onCreate(Unknown Source)
at com.tinkerpatch.sdk.loader.TinkerPatchReflectApplication.onCreate(Unknown Source)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5361)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1528)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
09-15 10:20:58.329 16703-16703/? W/Tinker.TinkerLoader: tryLoadPatchFiles:patch dir not exist:/data/user/0/com.ewzj.bigdata/tinker
09-15 10:20:58.330 16703-16703/? D/Tinker.DefaultAppLike: onBaseContextAttached:
09-15 10:20:58.331 16703-16703/? I/Tinker.ReflectApp: with app application from manifest applicationName:com.ewzj.bigdata.app.config.BaseApplication
09-15 10:20:58.342 16703-16703/? W/System.err: at com.tinkerpatch.sdk.loader.TinkerPatchReflectApplication.a(SourceFile:217)
09-15 10:20:58.342 16703-16703/? W/System.err: at com.tinkerpatch.sdk.loader.TinkerPatchReflectApplication.attachBaseContext(SourceFile:81)
09-15 10:20:58.343 16703-16703/? I/Tinker.ReflectApp: replaceApplicationLike delegateClass:class com.tinkerpatch.sdk.loader.TinkerPatchApplicationLike
09-15 10:20:58.350 16703-16703/? D/Tinker.DefaultAppLike: onCreate
09-15 10:20:58.555 16703-16703/? I/Tinker.ServerUtils: with app key from manifest appKey:9de7b9401060a1d0
09-15 10:20:58.555 16703-16703/? I/Tinker.ServerUtils: with app version from manifest appVersion:2.1.9
09-15 10:20:58.557 16703-16703/? I/Tinker.VersionInfo: readVersionInfo file path:/data/user/0/com.ewzj.bigdata/tinker_server/9de7b9401060a1d0_version.info, appVersion: 2.1.9, uuid:ed0ad231-0543-450b-87b5-a173173f5c14, abi:armeabi-v7a, patchVersion:0, patchMd5:, grayValue:9, crashTimes:0, retryTimes:0, applySuccess:0, patchSuccess:0
09-15 10:20:58.565 16703-16703/? I/Tinker.Debugger: debugger attached
09-15 10:20:58.566 16703-16703/? D/Tinker.Debugger: getBoolean(): key=.com.tinker.debugtool.debug, value=true
09-15 10:20:58.566 16703-16703/? I/Tinker.ServerClient: installTinkerServer, debug value: true, appVersion: 2.1.9, appKey: 9de7b9401060a1d0
09-15 10:20:58.569 16703-16703/? W/Tinker.Tinker: tinker patch directory: /data/user/0/com.ewzj.bigdata/tinker
09-15 10:20:58.569 16703-16703/? I/Tinker.Tinker: try to install tinker, isEnable: true, version: 1.8.1
09-15 10:20:58.569 16703-16703/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:-2, process name:com.ewzj.bigdata, main process:true, systemOTA:false, fingerPrint:OnePlus/OnePlus3/OnePlus3:6.0.1/MMB29M/386990:user/release-keys, oatDir:null, useInterpretMode:false
09-15 10:20:58.569 16703-16703/? W/Tinker.TinkerLoadResult: can't find patch file, is ok, just return
09-15 10:20:58.570 16703-16703/? I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/user/0/com.ewzj.bigdata/tinker, code: -2, cost: 2ms
09-15 10:20:58.570 16703-16703/? W/Tinker.Tinker: tinker load fail!
09-15 10:20:58.570 16703-16703/? I/Tinker.TinkerPatch: Init TinkerPatch sdk success, version:1.1.8
09-15 10:20:58.721 16723-16723/? W/Tinker.TinkerLoader: tryLoadPatchFiles:patch dir not exist:/data/user/0/com.ewzj.bigdata/tinker
09-15 10:20:58.721 16723-16723/? D/Tinker.DefaultAppLike: onBaseContextAttached:
09-15 10:20:58.722 16723-16723/? I/Tinker.ReflectApp: with app application from manifest applicationName:com.ewzj.bigdata.app.config.BaseApplication
Error:A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> Tinker does not support instant run mode, please trigger build by assembleDebug or disable instant run in 'File->Settings...'.
> can't find tinkerProcessDebugManifest, you must init tinker plugin first!
附上tinker的log,麻烦帮忙查看下什么问题。谢谢。
12-01 11:49:45.295 2945-2981/? I/ActivityManager: Start proc 3144:cn.madeapps.android.jyq:patch/u0a481 for service cn.madeapps.android.jyq/com.tencent.tinker.lib.service.TinkerPatchService
12-01 11:49:45.373 3144-3144/cn.madeapps.android.jyq:patch W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
12-01 11:49:45.373 3144-3144/cn.madeapps.android.jyq:patch D/Tinker.TinkerInternals: same fingerprint:SMARTISAN/icesky_msm8992/icesky_msm8992:5.1.1/LMY47V/57:user/release-keys
12-01 11:49:45.375 3144-3144/cn.madeapps.android.jyq:patch W/Tinker.TinkerLoader: tinker safe mode preferName:tinker_own_config_cn.madeapps.android.jyq:patch count:0
12-01 11:49:45.382 3144-3144/cn.madeapps.android.jyq:patch W/Tinker.TinkerLoader: after tinker safe mode count:1
12-01 11:49:45.382 3144-3144/cn.madeapps.android.jyq:patch W/Tinker.TinkerDexLoader: there is no dex to load
12-01 11:49:45.382 3144-3144/cn.madeapps.android.jyq:patch I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
12-01 11:49:45.384 3144-3144/cn.madeapps.android.jyq:patch D/Tinker.DefaultAppLike: onBaseContextAttached:
12-01 11:49:45.387 3144-3144/cn.madeapps.android.jyq:patch W/Tinker.Tinker: tinker patch directory: /data/data/cn.madeapps.android.jyq/tinker
12-01 11:49:45.390 3144-3144/cn.madeapps.android.jyq:patch I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0
12-01 11:49:45.390 3144-3144/cn.madeapps.android.jyq:patch I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:13f1ed4631382e066dfa1d27d0a7b515, newVersion:13f1ed4631382e066dfa1d27d0a7b515, current:13f1ed4631382e066dfa1d27d0a7b515
12-01 11:49:45.390 3144-3144/cn.madeapps.android.jyq:patch I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
12-01 11:49:45.390 3144-3144/cn.madeapps.android.jyq:patch I/Tinker.DefaultLoadReporter: patch load result, path:/data/data/cn.madeapps.android.jyq/tinker, code:0, cost:38
12-01 11:49:45.392 3144-3144/cn.madeapps.android.jyq:patch E/ActivityThread: Failed to find provider info for com.tinker.debug.debugprovider
12-01 11:49:45.392 3144-3144/cn.madeapps.android.jyq:patch W/Tinker.Debugger: debugger not attached cu == null
12-01 11:49:45.392 3144-3144/cn.madeapps.android.jyq:patch W/Tinker.ServerManager: installTinkerServer, debug value:false
12-01 11:49:45.408 3144-3144/cn.madeapps.android.jyq:patch D/Tinker.DefaultAppLike: onCreate
12-01 11:49:45.646 3144-3209/cn.madeapps.android.jyq:patch I/Tinker.DefaultPatchReporter: patchReporter: patch service start
12-01 11:49:45.647 3144-3209/cn.madeapps.android.jyq:patch I/Tinker.TinkerPatchService: try to increase patch process priority
12-01 11:49:45.691 3144-3209/cn.madeapps.android.jyq:patch I/Tinker.UpgradePatch: UpgradePatch tryPatch:patchMd5:4fc96b497f68e9ec48785aa259be6e77
12-01 11:49:45.691 3144-3209/cn.madeapps.android.jyq:patch I/Tinker.UpgradePatch: UpgradePatch tryPatch:patchVersionDirectory:/data/data/cn.madeapps.android.jyq/tinker/patch-4fc96b49
12-01 11:49:45.692 3144-3209/cn.madeapps.android.jyq:patch W/Tinker.UpgradePatch: UpgradePatch after /data/data/cn.madeapps.android.jyq/tinker_server/2.5_6.apk size:42867, /data/data/cn.madeapps.android.jyq/tinker/patch-4fc96b49/patch-4fc96b49.apk size:42867
12-01 11:49:45.705 3144-3209/cn.madeapps.android.jyq:patch E/Tinker.DexDiffPatchInternal: apk entry classes.dex crc is not equal, expect crc: 2954812340, got crc: 928160757
12-01 11:49:45.705 3144-3209/cn.madeapps.android.jyq:patch I/Tinker.DefaultPatchReporter: patchReporter: file extract fail type:dex_art, path:/data/data/cn.madeapps.android.jyq/tinker/patch-4fc96b49/patch-4fc96b49.apk, extractTo:/data/data/cn.madeapps.android.jyq/tinker/patch-4fc96b49/dex/classes.dex.jar, filename:classes.dex, isUpgrade:true
12-01 11:49:45.706 3144-3209/cn.madeapps.android.jyq:patch I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/cn.madeapps.android.jyq/tinker/patch-4fc96b49/patch-4fc96b49.apk
12-01 11:49:45.707 3144-3209/cn.madeapps.android.jyq:patch I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/cn.madeapps.android.jyq/tinker/patch-4fc96b49/dex
12-01 11:49:45.707 3144-3209/cn.madeapps.android.jyq:patch I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/cn.madeapps.android.jyq/tinker/patch-4fc96b49
12-01 11:49:45.707 3144-3209/cn.madeapps.android.jyq:patch W/Tinker.DexDiffPatchInternal: patch recover, extractDiffInternals fail
12-01 11:49:45.707 3144-3209/cn.madeapps.android.jyq:patch I/Tinker.DexDiffPatchInternal: recover dex result:false, cost:15, isUpgradePatch:true
12-01 11:49:45.707 3144-3209/cn.madeapps.android.jyq:patch E/Tinker.UpgradePatch: UpgradePatch tryPatch:new patch recover, try patch dex failed
12-01 11:49:45.707 3144-3209/cn.madeapps.android.jyq:patch I/Tinker.DefaultPatchReporter: patchReporter: patch all result path:/data/data/cn.madeapps.android.jyq/tinker_server/2.5_6.apk, success:false, cost:61, isUpgrade:true
12-01 11:49:45.715 1969-3219/cn.madeapps.android.jyq I/Tinker.DefaultTinkerResultService: DefaultTinkerResultService received a result:
PatchResult:
isUpgradePatch:true
isSuccess:false
rawPatchFilePath:/data/data/cn.madeapps.android.jyq/tinker_server/2.5_6.apk
costTime:61
patchVersion:4fc96b497f68e9ec48785aa259be6e77
> 12-01 11:49:45.717 1969-3219/cn.madeapps.android.jyq I/Process: killProcess pid=3144
java.lang.RuntimeException
at android.os.Process.killProcess(Process.java:1106)
at com.tencent.tinker.lib.util.TinkerServiceInternals.killTinkerPatchServiceProcess(TinkerServiceInternals.java:54)
at com.tencent.tinker.lib.service.DefaultTinkerResultService.onPatchResult(DefaultTinkerResultService.java:48)
at com.tencent.tinker.lib.service.AbstractResultService.onHandleIntent(AbstractResultService.java:62)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
12-01 11:50:26.576 4038-4038/? W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
12-01 11:50:26.576 4038-4038/? D/Tinker.TinkerInternals: same fingerprint:SMARTISAN/icesky_msm8992/icesky_msm8992:5.1.1/LMY47V/57:user/release-keys
12-01 11:50:26.578 4038-4038/? W/Tinker.TinkerLoader: tinker safe mode preferName:tinker_own_config_cn.madeapps.android.jyq count:0
12-01 11:50:26.581 4038-4038/? W/Tinker.TinkerLoader: after tinker safe mode count:1
12-01 11:50:26.582 4038-4038/? W/Tinker.TinkerDexLoader: there is no dex to load
12-01 11:50:26.582 4038-4038/? I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
12-01 11:50:26.583 4038-4038/? D/Tinker.DefaultAppLike: onBaseContextAttached:
12-01 11:50:26.585 4038-4038/? W/Tinker.Tinker: tinker patch directory: /data/data/cn.madeapps.android.jyq/tinker
12-01 11:50:26.587 4038-4038/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0
12-01 11:50:26.587 4038-4038/? I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:13f1ed4631382e066dfa1d27d0a7b515, newVersion:13f1ed4631382e066dfa1d27d0a7b515, current:13f1ed4631382e066dfa1d27d0a7b515
12-01 11:50:26.587 4038-4038/? I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
12-01 11:50:26.587 4038-4038/? I/Tinker.DefaultLoadReporter: patch load result, path:/data/data/cn.madeapps.android.jyq/tinker, code:0, cost:24
12-01 11:50:26.588 4038-4038/? E/ActivityThread: Failed to find provider info for com.tinker.debug.debugprovider
12-01 11:50:26.588 4038-4038/? W/Tinker.Debugger: debugger not attached cu == null
12-01 11:50:26.588 4038-4038/? W/Tinker.ServerManager: installTinkerServer, debug value:false
12-01 11:50:26.600 4038-4038/? D/Tinker.DefaultAppLike: onCreate
12-01 11:50:26.721 4038-4038/? I/YWChannel: prepareImpl appkey=23398465 appid=65 versionSuffix=OPENIM app=cn.madeapps.android.jyq.app.MyTinkerApplication@169ce2ba
12-01 11:50:26.820 4079-4079/? W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
12-01 11:50:26.820 4079-4079/? D/Tinker.TinkerInternals: same fingerprint:SMARTISAN/icesky_msm8992/icesky_msm8992:5.1.1/LMY47V/57:user/release-keys
12-01 11:50:26.822 4079-4079/? W/Tinker.TinkerLoader: tinker safe mode preferName:tinker_own_config_cn.madeapps.android.jyq:TcmsService count:0
12-01 11:50:26.828 4079-4079/? W/Tinker.TinkerLoader: after tinker safe mode count:1
12-01 11:50:26.828 4079-4079/? W/Tinker.TinkerDexLoader: there is no dex to load
12-01 11:50:26.829 4079-4079/? I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
12-01 11:50:26.830 4079-4079/? D/Tinker.DefaultAppLike: onBaseContextAttached:
12-01 11:50:26.832 4079-4079/? W/Tinker.Tinker: tinker patch directory: /data/data/cn.madeapps.android.jyq/tinker
12-01 11:50:26.834 4079-4079/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0
12-01 11:50:26.834 4079-4079/? I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:13f1ed4631382e066dfa1d27d0a7b515, newVersion:13f1ed4631382e066dfa1d27d0a7b515, current:13f1ed4631382e066dfa1d27d0a7b515
12-01 11:50:26.834 4079-4079/? I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
12-01 11:50:26.834 4079-4079/? I/Tinker.DefaultLoadReporter: patch load result, path:/data/data/cn.madeapps.android.jyq/tinker, code:0, cost:28
12-01 11:50:26.835 4079-4079/? E/ActivityThread: Failed to find provider info for com.tinker.debug.debugprovider
12-01 11:50:26.836 4079-4079/? W/Tinker.Debugger: debugger not attached cu == null
12-01 11:50:26.836 4079-4079/? W/Tinker.ServerManager: installTinkerServer, debug value:false
12-01 11:50:26.848 4079-4079/? D/Tinker.DefaultAppLike: onCreate
12-01 11:50:27.684 4038-4038/cn.madeapps.android.jyq I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/cn.madeapps.android.jyq/tinker_server/2.5_6.apk
12-01 11:50:27.694 4038-4038/cn.madeapps.android.jyq W/Tinker.SampleRequestCallback: beforePatchRequest, retry patch install have more than 3 count, version: 6, patch:/data/data/cn.madeapps.android.jyq/tinker_server/2.5_6.apk
12-01 11:50:27.783 4038-4279/cn.madeapps.android.jyq D/Tinker.UrlConnectionFetcher: response code 200 msg: OK
12-01 11:50:27.783 4038-4279/cn.madeapps.android.jyq E/Tinker.ClientImpl: tinker server sync respond:{"v":7}
12-01 11:50:27.784 4038-4279/cn.madeapps.android.jyq I/Tinker.ClientImpl: sync response in update:version:7
grayValue:null
conditions:
pause:false
rollback:false
12-01 11:50:27.786 4038-4279/cn.madeapps.android.jyq W/Tinker.ClientImpl: update return true, patchVersion from 6 to 7
12-01 11:50:27.786 4038-4279/cn.madeapps.android.jyq W/Tinker.ClientImpl: isInGrayGroup return true, gray value:null and my gray value is 7
12-01 11:50:27.841 4038-4279/cn.madeapps.android.jyq D/Tinker.UrlConnectionFetcher: response code 200 msg: OK
12-01 11:50:27.842 4038-4279/cn.madeapps.android.jyq W/Tinker.RequestCallback: onPatchUpgrade, file:/data/data/cn.madeapps.android.jyq/tinker_server/2.5_7.apk, newVersion:7, currentVersion:6
12-01 11:50:27.848 4038-4279/cn.madeapps.android.jyq I/Tinker.ServerClient: tinker server report patch success, patchVersion:7
12-01 11:50:27.849 4038-4279/cn.madeapps.android.jyq I/Tinker.ClientImpl: updateVersionProperty file path:/data/data/cn.madeapps.android.jyq/tinker_server/version.info , appVersion: 2.5 , patchVersion:7 , patchMd5:77c836c6841331fcc0fa2d1f820ae075 , grayValue:7 , uuid:d7433964-9f77-4281-8d12-a7992331efb9
12-01 11:50:27.881 2945-3747/? I/ActivityManager: Start proc 4302:cn.madeapps.android.jyq:patch/u0a481 for service cn.madeapps.android.jyq/com.tencent.tinker.lib.service.TinkerPatchService
12-01 11:50:27.937 4302-4302/? W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
12-01 11:50:27.937 4302-4302/? D/Tinker.TinkerInternals: same fingerprint:SMARTISAN/icesky_msm8992/icesky_msm8992:5.1.1/LMY47V/57:user/release-keys
12-01 11:50:27.939 4302-4302/? W/Tinker.TinkerLoader: tinker safe mode preferName:tinker_own_config_cn.madeapps.android.jyq:patch count:0
12-01 11:50:27.954 4302-4302/? W/Tinker.TinkerLoader: after tinker safe mode count:1
12-01 11:50:27.954 4302-4302/? W/Tinker.TinkerDexLoader: there is no dex to load
12-01 11:50:27.954 4302-4302/? I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
12-01 11:50:27.955 4302-4302/? D/Tinker.DefaultAppLike: onBaseContextAttached:
12-01 11:50:27.957 4302-4302/? W/Tinker.Tinker: tinker patch directory: /data/data/cn.madeapps.android.jyq/tinker
12-01 11:50:27.960 4302-4302/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0
12-01 11:50:27.960 4302-4302/? I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:13f1ed4631382e066dfa1d27d0a7b515, newVersion:13f1ed4631382e066dfa1d27d0a7b515, current:13f1ed4631382e066dfa1d27d0a7b515
12-01 11:50:27.960 4302-4302/? I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
12-01 11:50:27.960 4302-4302/? I/Tinker.DefaultLoadReporter: patch load result, path:/data/data/cn.madeapps.android.jyq/tinker, code:0, cost:35
12-01 11:50:27.963 4302-4302/? E/ActivityThread: Failed to find provider info for com.tinker.debug.debugprovider
12-01 11:50:27.963 4302-4302/? W/Tinker.Debugger: debugger not attached cu == null
12-01 11:50:27.963 4302-4302/? W/Tinker.ServerManager: installTinkerServer, debug value:false
12-01 11:50:27.974 4302-4302/? D/Tinker.DefaultAppLike: onCreate
12-01 11:50:28.015 4038-4279/cn.madeapps.android.jyq D/Tinker.UrlConnectionFetcher: response code 200 msg: OK
12-01 11:50:28.015 4038-4279/cn.madeapps.android.jyq D/Tinker.ClientImpl: reportSuccess successfully:{"succ":1}
12-01 11:50:28.133 4302-4370/? I/Tinker.DefaultPatchReporter: patchReporter: patch service start
12-01 11:50:28.133 4302-4370/? I/Tinker.TinkerPatchService: try to increase patch process priority
12-01 11:50:28.153 4302-4370/? I/Tinker.UpgradePatch: UpgradePatch tryPatch:patchMd5:77c836c6841331fcc0fa2d1f820ae075
12-01 11:50:28.153 4302-4370/? I/Tinker.UpgradePatch: UpgradePatch tryPatch:patchVersionDirectory:/data/data/cn.madeapps.android.jyq/tinker/patch-77c836c6
12-01 11:50:28.153 4302-4370/? W/Tinker.UpgradePatch: UpgradePatch after /data/data/cn.madeapps.android.jyq/tinker_server/2.5_7.apk size:2431, /data/data/cn.madeapps.android.jyq/tinker/patch-77c836c6/patch-77c836c6.apk size:2431
12-01 11:50:28.154 4302-4370/? W/Tinker.DexDiffPatchInternal: patch recover, dex is not contained
12-01 11:50:28.154 4302-4370/? W/Tinker.BsDiffPatchInternal: patch recover, library is not contained
12-01 11:50:28.154 4302-4370/? W/Tinker.ResDiffPatchInternal: patch recover, resource is not contained
12-01 11:50:28.154 4302-4370/? I/PatchInfo: rewritePatchInfoFile file path:/data/data/cn.madeapps.android.jyq/tinker/patch.info , oldVer:13f1ed4631382e066dfa1d27d0a7b515, newVer:77c836c6841331fcc0fa2d1f820ae075
12-01 11:50:28.161 4302-4370/? W/Tinker.UpgradePatch: UpgradePatch tryPatch: done, it is ok
12-01 11:50:28.161 4302-4370/? I/Tinker.DefaultPatchReporter: patchReporter: patch all result path:/data/data/cn.madeapps.android.jyq/tinker_server/2.5_7.apk, success:true, cost:29, isUpgrade:true
12-01 11:50:28.172 4038-4373/cn.madeapps.android.jyq I/Tinker.DefaultTinkerResultService: DefaultTinkerResultService received a result:
PatchResult:
isUpgradePatch:true
isSuccess:true
rawPatchFilePath:/data/data/cn.madeapps.android.jyq/tinker_server/2.5_7.apk
costTime:29
patchVersion:77c836c6841331fcc0fa2d1f820ae075
> 12-01 11:50:28.174 4038-4373/cn.madeapps.android.jyq I/Process: killProcess pid=4302
java.lang.RuntimeException
at android.os.Process.killProcess(Process.java:1106)
at com.tencent.tinker.lib.util.TinkerServiceInternals.killTinkerPatchServiceProcess(TinkerServiceInternals.java:54)
at com.tencent.tinker.lib.service.DefaultTinkerResultService.onPatchResult(DefaultTinkerResultService.java:48)
at com.tencent.tinker.lib.service.AbstractResultService.onHandleIntent(AbstractResultService.java:62)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
12-01 11:50:28.174 4038-4373/cn.madeapps.android.jyq I/Tinker.DefaultTinkerResultService: save delete raw patch file
12-01 11:50:28.174 4038-4373/cn.madeapps.android.jyq I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/cn.madeapps.android.jyq/tinker_server/2.5_7.apk
12-01 11:50:28.175 4038-4373/cn.madeapps.android.jyq I/Process: killProcess pid=4038
java.lang.RuntimeException
at android.os.Process.killProcess(Process.java:1106)
at com.tencent.tinker.lib.service.DefaultTinkerResultService.onPatchResult(DefaultTinkerResultService.java:59)
at com.tencent.tinker.lib.service.AbstractResultService.onHandleIntent(AbstractResultService.java:62)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
12-01 11:50:53.316 4407-4407/? W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
12-01 11:50:53.317 4407-4407/? D/Tinker.TinkerInternals: same fingerprint:SMARTISAN/icesky_msm8992/icesky_msm8992:5.1.1/LMY47V/57:user/release-keys
12-01 11:50:53.317 4407-4407/? I/PatchInfo: rewritePatchInfoFile file path:/data/data/cn.madeapps.android.jyq/tinker/patch.info , oldVer:77c836c6841331fcc0fa2d1f820ae075, newVer:77c836c6841331fcc0fa2d1f820ae075
12-01 11:50:53.320 4407-4407/? W/Tinker.TinkerLoader: tinker safe mode preferName:tinker_own_config_cn.madeapps.android.jyq count:0
12-01 11:50:53.327 4407-4407/? W/Tinker.TinkerLoader: after tinker safe mode count:1
12-01 11:50:53.327 4407-4407/? W/Tinker.TinkerDexLoader: there is no dex to load
12-01 11:50:53.327 4407-4407/? I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
12-01 11:50:53.328 4407-4407/? D/Tinker.DefaultAppLike: onBaseContextAttached:
12-01 11:50:53.330 4407-4407/? W/Tinker.Tinker: tinker patch directory: /data/data/cn.madeapps.android.jyq/tinker
12-01 11:50:53.334 4407-4407/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0
12-01 11:50:53.334 4407-4407/? I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:13f1ed4631382e066dfa1d27d0a7b515, newVersion:77c836c6841331fcc0fa2d1f820ae075, current:77c836c6841331fcc0fa2d1f820ae075
12-01 11:50:53.334 4407-4407/? I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
12-01 11:50:53.334 4407-4407/? I/Tinker.DefaultLoadReporter: patch version change from 13f1ed4631382e066dfa1d27d0a7b515 to 77c836c6841331fcc0fa2d1f820ae075
12-01 11:50:53.334 4407-4407/? I/Tinker.DefaultLoadReporter: try kill all other process
12-01 11:50:53.337 4407-4407/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/cn.madeapps.android.jyq/tinker/patch-13f1ed46/patch-13f1ed46.apk
12-01 11:50:53.337 4407-4407/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/cn.madeapps.android.jyq/tinker/patch-13f1ed46
12-01 11:50:53.337 4407-4407/? I/Tinker.DefaultLoadReporter: patch load result, path:/data/data/cn.madeapps.android.jyq/tinker, code:0, cost:28
12-01 11:50:53.340 4407-4407/? E/ActivityThread: Failed to find provider info for com.tinker.debug.debugprovider
12-01 11:50:53.340 4407-4407/? W/Tinker.Debugger: debugger not attached cu == null
12-01 11:50:53.340 4407-4407/? W/Tinker.ServerManager: installTinkerServer, debug value:false
12-01 11:50:53.353 4407-4407/? D/Tinker.DefaultAppLike: onCreate
12-01 11:50:53.530 4407-4407/? I/YWChannel: prepareImpl appkey=23398465 appid=65 versionSuffix=OPENIM app=cn.madeapps.android.jyq.app.MyTinkerApplication@169ce2ba
12-01 11:50:53.680 4473-4473/? W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
12-01 11:50:53.680 4473-4473/? D/Tinker.TinkerInternals: same fingerprint:SMARTISAN/icesky_msm8992/icesky_msm8992:5.1.1/LMY47V/57:user/release-keys
12-01 11:50:53.687 4473-4473/? W/Tinker.TinkerLoader: tinker safe mode preferName:tinker_own_config_cn.madeapps.android.jyq:TcmsService count:0
12-01 11:50:53.694 4473-4473/? W/Tinker.TinkerLoader: after tinker safe mode count:1
12-01 11:50:53.694 4473-4473/? W/Tinker.TinkerDexLoader: there is no dex to load
12-01 11:50:53.695 4473-4473/? I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
12-01 11:50:53.696 4473-4473/? D/Tinker.DefaultAppLike: onBaseContextAttached:
12-01 11:50:53.699 4473-4473/? W/Tinker.Tinker: tinker patch directory: /data/data/cn.madeapps.android.jyq/tinker
12-01 11:50:53.702 4473-4473/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0
12-01 11:50:53.702 4473-4473/? I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:77c836c6841331fcc0fa2d1f820ae075, newVersion:77c836c6841331fcc0fa2d1f820ae075, current:77c836c6841331fcc0fa2d1f820ae075
12-01 11:50:53.702 4473-4473/? I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
12-01 11:50:53.702 4473-4473/? I/Tinker.DefaultLoadReporter: patch load result, path:/data/data/cn.madeapps.android.jyq/tinker, code:0, cost:41
12-01 11:50:53.704 4473-4473/? E/ActivityThread: Failed to find provider info for com.tinker.debug.debugprovider
12-01 11:50:53.704 4473-4473/? W/Tinker.Debugger: debugger not attached cu == null
12-01 11:50:53.704 4473-4473/? W/Tinker.ServerManager: installTinkerServer, debug value:false
12-01 11:50:53.718 4473-4473/? D/Tinker.DefaultAppLike: onCreate
12-01 11:50:54.796 4407-4799/cn.madeapps.android.jyq D/Tinker.UrlConnectionFetcher: response code 200 msg: OK
12-01 11:50:54.796 4407-4799/cn.madeapps.android.jyq E/Tinker.ClientImpl: tinker server sync respond:{"v":7}
12-01 11:50:54.797 4407-4799/cn.madeapps.android.jyq I/Tinker.ClientImpl: sync response in update:version:7
grayValue:null
conditions:
pause:false
rollback:false
12-01 11:50:54.797 4407-4799/cn.madeapps.android.jyq W/Tinker.ClientImpl: update return false, target version is not latest. current version is:7
12-01 11:50:54.797 4407-4799/cn.madeapps.android.jyq I/Tinker.ClientImpl: Needn't update, sync response is: version:7
grayValue:null
conditions:
pause:false
rollback:false
gray: 7
12-01 11:50:55.841 4407-4407/cn.madeapps.android.jyq I/Tinker.DefaultLoadReporter: patch load Reporter: patch receive fail:/, code:-2, isUpgrade:true
12-01 11:50:55.927 4853-4853/cn.madeapps.android.jyq:TcmsService W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
12-01 11:50:55.927 4853-4853/cn.madeapps.android.jyq:TcmsService D/Tinker.TinkerInternals: same fingerprint:SMARTISAN/icesky_msm8992/icesky_msm8992:5.1.1/LMY47V/57:user/release-keys
12-01 11:50:55.932 4853-4853/cn.madeapps.android.jyq:TcmsService W/Tinker.TinkerLoader: tinker safe mode preferName:tinker_own_config_cn.madeapps.android.jyq:TcmsService count:0
12-01 11:50:55.945 4853-4853/cn.madeapps.android.jyq:TcmsService W/Tinker.TinkerLoader: after tinker safe mode count:1
12-01 11:50:55.945 4853-4853/cn.madeapps.android.jyq:TcmsService W/Tinker.TinkerDexLoader: there is no dex to load
12-01 11:50:55.945 4853-4853/cn.madeapps.android.jyq:TcmsService I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
12-01 11:50:55.947 4853-4853/cn.madeapps.android.jyq:TcmsService D/Tinker.DefaultAppLike: onBaseContextAttached:
12-01 11:50:55.948 4881-4881/? W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
12-01 11:50:55.949 4881-4881/? D/Tinker.TinkerInternals: same fingerprint:SMARTISAN/icesky_msm8992/icesky_msm8992:5.1.1/LMY47V/57:user/release-keys
12-01 11:50:55.949 4853-4853/cn.madeapps.android.jyq:TcmsService W/Tinker.Tinker: tinker patch directory: /data/data/cn.madeapps.android.jyq/tinker
12-01 11:50:55.951 4853-4853/cn.madeapps.android.jyq:TcmsService I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0
12-01 11:50:55.951 4853-4853/cn.madeapps.android.jyq:TcmsService I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:77c836c6841331fcc0fa2d1f820ae075, newVersion:77c836c6841331fcc0fa2d1f820ae075, current:77c836c6841331fcc0fa2d1f820ae075
12-01 11:50:55.951 4853-4853/cn.madeapps.android.jyq:TcmsService I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
12-01 11:50:55.951 4853-4853/cn.madeapps.android.jyq:TcmsService I/Tinker.DefaultLoadReporter: patch load result, path:/data/data/cn.madeapps.android.jyq/tinker, code:0, cost:36
12-01 11:50:55.952 4853-4853/cn.madeapps.android.jyq:TcmsService E/ActivityThread: Failed to find provider info for com.tinker.debug.debugprovider
12-01 11:50:55.952 4853-4853/cn.madeapps.android.jyq:TcmsService W/Tinker.Debugger: debugger not attached cu == null
12-01 11:50:55.952 4853-4853/cn.madeapps.android.jyq:TcmsService W/Tinker.ServerManager: installTinkerServer, debug value:false
12-01 11:50:55.953 4881-4881/? W/Tinker.TinkerLoader: tinker safe mode preferName:tinker_own_config_cn.madeapps.android.jyq:remote count:0
12-01 11:50:55.959 4881-4881/? W/Tinker.TinkerLoader: after tinker safe mode count:1
12-01 11:50:55.959 4881-4881/? W/Tinker.TinkerDexLoader: there is no dex to load
12-01 11:50:55.960 4881-4881/? I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
12-01 11:50:55.960 4853-4853/cn.madeapps.android.jyq:TcmsService D/Tinker.DefaultAppLike: onCreate
12-01 11:50:55.961 4881-4881/? D/Tinker.DefaultAppLike: onBaseContextAttached:
12-01 11:50:55.963 4881-4881/? W/Tinker.Tinker: tinker patch directory: /data/data/cn.madeapps.android.jyq/tinker
12-01 11:50:55.969 4881-4881/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0
12-01 11:50:55.969 4881-4881/? I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:77c836c6841331fcc0fa2d1f820ae075, newVersion:77c836c6841331fcc0fa2d1f820ae075, current:77c836c6841331fcc0fa2d1f820ae075
12-01 11:50:55.969 4881-4881/? I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
12-01 11:50:55.969 4881-4881/? I/Tinker.DefaultLoadReporter: patch load result, path:/data/data/cn.madeapps.android.jyq/tinker, code:0, cost:29
12-01 11:50:55.975 4881-4881/? E/ActivityThread: Failed to find provider info for com.tinker.debug.debugprovider
12-01 11:50:55.975 4881-4881/? W/Tinker.Debugger: debugger not attached cu == null
12-01 11:50:55.975 4881-4881/? W/Tinker.ServerManager: installTinkerServer, debug value:false
12-01 11:50:55.988 4881-4881/? D/Tinker.DefaultAppLike: onCreate
路径.app.SampleApplication
public SampleApplicationLike(Application application, int tinkerFlags, boolean tinkerLoadVerifyFlag,
long applicationStartElapsedTime, long applicationStartMillisTime, Intent tinkerResultIntent,
Resources[] resources, ClassLoader[] classLoader, AssetManager[] assetManager) {
super(application, tinkerFlags, tinkerLoadVerifyFlag, applicationStartElapsedTime, applicationStartMillisTime, tinkerResultIntent, resources, classLoader, assetManager);
}
里面的参数没有介绍以及实例化
Tinker.ReportUtil: checkTinkerApplySuccess, current patch md5:d84a59890c0e03f235c4067d9dd0a159 is not equal with tinker version 8351467ee02024bc53c13df50d61799a
app加载补丁的错误状态没法查看
我把补丁包都删除了,但是还是会执行回滚操作并且杀掉进程,这是什么原因,求解
11-23 12:53:21.199 1639-1639/com.hydee.hdsec I/Tinker.Utils: ScreenReceiver action [android.intent.action.SCREEN_OFF]
11-23 12:53:21.209 1639-1639/com.hydee.hdsec V/Process: killProcess [1693] Callers=com.tencent.tinker.loader.shareutil.ShareTinkerInternals.killAllOtherProcess:269 com.tencent.tinker.server.client.DefaultPatchRequestCallback.rollbackPatchDirectly:169 com.hydee.hdsec.tinker.reporter.SamplePatchRequestCallback$1.onScreenOff:117 com.hydee.hdsec.tinker.util.Utils$ScreenState$1.onReceive:187
11-23 12:53:21.209 1639-1639/com.hydee.hdsec V/Process: killProcess [1639] Callers=com.tencent.tinker.server.client.DefaultPatchRequestCallback.rollbackPatchDirectly:170 com.hydee.hdsec.tinker.reporter.SamplePatchRequestCallback$1.onScreenOff:117 com.hydee.hdsec.tinker.util.Utils$ScreenState$1.onReceive:187 android.app.LoadedApk$ReceiverDispatcher$Args.run:927
11-23 12:53:21.879 2868-2868/com.hydee.hdsec W/Tinker.TinkerLoader: tryLoadPatchFiles:patch dir not exist:/data/data/com.hydee.hdsec/tinker
11-23 12:53:21.889 2868-2868/com.hydee.hdsec D/Tinker.DefaultAppLike: onBaseContextAttached:
11-23 12:53:21.899 2868-2868/com.hydee.hdsec I/Tinker.SamplePatchListener: application maxMemory:256
11-23 12:53:21.909 2868-2868/com.hydee.hdsec W/Tinker.Tinker: tinker patch directory: /data/data/com.hydee.hdsec/tinker
11-23 12:53:21.909 2868-2868/com.hydee.hdsec I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:-2
11-23 12:53:21.909 2868-2868/com.hydee.hdsec W/Tinker.TinkerLoadResult: can't find patch file, is ok, just return
11-23 12:53:21.909 2868-2868/com.hydee.hdsec I/Tinker.DefaultLoadReporter: patch load result, path:/data/data/com.hydee.hdsec/tinker, code:-2, cost:3
11-23 12:53:21.909 2868-2868/com.hydee.hdsec W/Tinker.Tinker: tinker load fail!
11-23 12:53:21.909 1047-2337/? W/ActivityManager: Permission Denial: opening provider com.tinker.debug.DebugProvider from ProcessRecord{2116ac5 2868:com.hydee.hdsec/u0a157} (pid=2868, uid=10157) that is not exported from uid 10155
11-23 12:53:21.909 2868-2868/com.hydee.hdsec E/Tinker.Debugger: Get contentProvider error
11-23 12:53:21.909 2868-2868/com.hydee.hdsec W/Tinker.Debugger: debugger not attached cu == null
11-23 12:53:21.909 2868-2868/com.hydee.hdsec W/Tinker.ServerManager: installTinkerServer, debug value:false
11-23 12:53:21.939 2868-2868/com.hydee.hdsec D/Tinker.DefaultAppLike: onCreate
11-23 12:53:22.159 2939-2939/com.hydee.hdsec:pushservice W/Tinker.TinkerLoader: tryLoadPatchFiles:patch dir not exist:/data/data/com.hydee.hdsec/tinker
11-23 12:53:22.159 2939-2939/com.hydee.hdsec:pushservice D/Tinker.DefaultAppLike: onBaseContextAttached:
11-23 12:53:22.159 2939-2939/com.hydee.hdsec:pushservice I/Tinker.SamplePatchListener: application maxMemory:256
11-23 12:53:22.169 2939-2939/com.hydee.hdsec:pushservice W/Tinker.Tinker: tinker patch directory: /data/data/com.hydee.hdsec/tinker
11-23 12:53:22.169 2939-2939/com.hydee.hdsec:pushservice I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:-2
11-23 12:53:22.169 2939-2939/com.hydee.hdsec:pushservice W/Tinker.TinkerLoadResult: can't find patch file, is ok, just return
11-23 12:53:22.169 2939-2939/com.hydee.hdsec:pushservice I/Tinker.DefaultLoadReporter: patch load result, path:/data/data/com.hydee.hdsec/tinker, code:-2, cost:3
11-23 12:53:22.169 2939-2939/com.hydee.hdsec:pushservice W/Tinker.Tinker: tinker load fail!
11-23 12:53:22.169 1047-2531/? W/ActivityManager: Permission Denial: opening provider com.tinker.debug.DebugProvider from ProcessRecord{10a4e927 2939:com.hydee.hdsec:pushservice/u0a157} (pid=2939, uid=10157) that is not exported from uid 10155
11-23 12:53:22.169 2939-2939/com.hydee.hdsec:pushservice E/Tinker.Debugger: Get contentProvider error
11-23 12:53:22.169 2939-2939/com.hydee.hdsec:pushservice W/Tinker.Debugger: debugger not attached cu == null
11-23 12:53:22.169 2939-2939/com.hydee.hdsec:pushservice W/Tinker.ServerManager: installTinkerServer, debug value:false
11-23 12:53:22.199 2939-2939/com.hydee.hdsec:pushservice D/Tinker.DefaultAppLike: onCreate
11-23 12:53:22.249 2939-2939/com.hydee.hdsec:pushservice W/Tinker.UpgradePatchRetry: onPatchRetryLoad retry is not main process, just return
11-23 12:53:22.619 2868-2868/com.hydee.hdsec W/Tinker.UpgradePatchRetry: onPatchRetryLoad retry info not exist, just return
11-23 12:53:22.989 2868-3025/com.hydee.hdsec D/Tinker.UrlConnectionFetcher: response code 200 msg: OK
11-23 12:53:22.989 2868-3025/com.hydee.hdsec E/Tinker.ClientImpl: tinker server sync respond:{"e":1}
11-23 12:53:22.989 2868-3025/com.hydee.hdsec I/Tinker.ClientImpl: sync response in update:version:
grayValue:null
conditions:
pause:false
rollback:true
11-23 12:53:22.989 2868-3025/com.hydee.hdsec W/Tinker.SampleRequestCallback: onPatchRollback
11-23 12:53:22.989 2868-3025/com.hydee.hdsec I/Tinker.SampleRequestCallback: tinker wait screen to clean patch and kill all process`
怎么确定客户端是否拉取到补丁了?
TinkerServerManager.installTinkerServer(getApplication(), Tinker.with(getApplication()), 3);
之后,在SamplePatchRequestCallback中,一直走onPatchSyncFail 回调:
java.io.FileNotFoundException: http://q.tinkerpatch.com/330d94fe4e200800/1.0.0?d=fd119223-38a5-45e5-ade4-ff7912f7f5ae&v=1479803868170
已配置appKey这些,然后本地补丁可成功应用,php管理页已上传补丁
①怎么确定与后台的连接配置无误,已设置key这些
②在php管理页上传补丁有个版本,怎么累加的?
③怎么查看获取补丁成功与否?
我查下后台,下载量一直为0的。谢谢
01-13 11:51:48.164 13086-13086/? I/Tinker.ServerUtils: with app key from manifest appKey:53d1f23ff386bc3c
01-13 11:51:48.174 13086-13086/? I/Tinker.ServerUtils: with app version from manifest appVersion:2016122101
01-13 11:51:48.174 13086-13086/? I/Tinker.VersionInfo: readVersionInfo file path:/data/data/com.yunshanghui.o2o/tinker_server/version.info, appVersion: 2016122101, uuid:25adc1d7-ee5d-4933-abc7-ee6228bb1491, abi:armeabi, patchVersion:2, patchMd5:524e105f2472db7e849cce3ce73dcb4b, grayValue:1, crashTimes:0, retryTimes:0
01-13 11:51:48.184 13086-13086/? W/Tinker.Debugger: debugger not attached cu == null
01-13 11:51:48.184 13086-13086/? W/Tinker.ServerClient: installTinkerServer, debug value: false, appVersion: 2016122101, appKey: 53d1f23ff386bc3c
01-13 11:51:48.194 13086-13086/? W/Tinker.Tinker: tinker patch directory: /data/data/com.yunshanghui.o2o/tinker
01-13 11:51:48.204 13086-13086/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0
01-13 11:51:48.204 13086-13086/? I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:524e105f2472db7e849cce3ce73dcb4b, newVersion:524e105f2472db7e849cce3ce73dcb4b, current:524e105f2472db7e849cce3ce73dcb4b
01-13 11:51:48.204 13086-13086/? I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
01-13 11:51:48.204 13086-13086/? I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/data/com.yunshanghui.o2o/tinker, code:0, cost:81
01-13 11:51:50.204 13190-13190/? W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
01-13 11:51:50.214 13190-13190/? W/Tinker.TinkerLoader: tinker safe mode preferName:tinker_own_config_com.yunshanghui.o2o:channel count:1
01-13 11:51:50.234 13190-13190/? I/Tinker.TinkerDexLoader: classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.yunshanghui.o2o-1/base.apk"],nativeLibraryDirectories=[/data/app/com.yunshanghui.o2o-1/lib/arm, /vendor/lib, /system/lib]]]
01-13 11:51:50.244 13190-13190/? I/Tinker.ClassLoaderAdder: after loaded classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/data/com.yunshanghui.o2o/tinker/patch-524e105f/dex/classes.dex.jar", zip file "/data/data/com.yunshanghui.o2o/tinker/patch-524e105f/dex/test.dex.jar", zip file "/data/app/com.yunshanghui.o2o-1/base.apk"],nativeLibraryDirectories=[/data/app/com.yunshanghui.o2o-1/lib/arm, /vendor/lib, /system/lib]]], dex size:2
01-13 11:51:50.244 13190-13190/? W/Tinker.ClassLoaderAdder: checkDexInstall result:true
01-13 11:51:50.244 13190-13190/? I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
01-13 11:51:50.304 13190-13190/? I/Tinker.ServerUtils: with app key from manifest appKey:53d1f23ff386bc3c
01-13 11:51:50.304 13190-13190/? I/Tinker.ServerUtils: with app version from manifest appVersion:2016122101
01-13 11:51:50.304 13190-13190/? I/Tinker.VersionInfo: readVersionInfo file path:/data/data/com.yunshanghui.o2o/tinker_server/version.info, appVersion: 2016122101, uuid:25adc1d7-ee5d-4933-abc7-ee6228bb1491, abi:armeabi, patchVersion:2, patchMd5:524e105f2472db7e849cce3ce73dcb4b, grayValue:1, crashTimes:0, retryTimes:0
01-13 11:51:50.314 13190-13190/? W/Tinker.Debugger: debugger not attached cu == null
01-13 11:51:50.314 13190-13190/? W/Tinker.ServerClient: installTinkerServer, debug value: false, appVersion: 2016122101, appKey: 53d1f23ff386bc3c
01-13 11:51:50.324 13190-13190/? W/Tinker.Tinker: tinker patch directory: /data/data/com.yunshanghui.o2o/tinker
01-13 11:51:50.334 13190-13190/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0
01-13 11:51:50.334 13190-13190/? I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:524e105f2472db7e849cce3ce73dcb4b, newVersion:524e105f2472db7e849cce3ce73dcb4b, current:524e105f2472db7e849cce3ce73dcb4b
01-13 11:51:50.334 13190-13190/? I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
01-13 11:51:50.334 13190-13190/? I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/data/com.yunshanghui.o2o/tinker, code:0, cost:72
01-13 11:51:52.044 13252-13252/? W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
01-13 11:51:52.054 13252-13252/? W/Tinker.TinkerLoader: tinker safe mode preferName:tinker_own_config_com.yunshanghui.o2o:channel count:1
01-13 11:51:52.094 13252-13252/? I/Tinker.TinkerDexLoader: classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.yunshanghui.o2o-1/base.apk"],nativeLibraryDirectories=[/data/app/com.yunshanghui.o2o-1/lib/arm, /vendor/lib, /system/lib]]]
01-13 11:51:52.104 13252-13252/? I/Tinker.ClassLoaderAdder: after loaded classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/data/com.yunshanghui.o2o/tinker/patch-524e105f/dex/classes.dex.jar", zip file "/data/data/com.yunshanghui.o2o/tinker/patch-524e105f/dex/test.dex.jar", zip file "/data/app/com.yunshanghui.o2o-1/base.apk"],nativeLibraryDirectories=[/data/app/com.yunshanghui.o2o-1/lib/arm, /vendor/lib, /system/lib]]], dex size:2
01-13 11:51:52.104 13252-13252/? W/Tinker.ClassLoaderAdder: checkDexInstall result:true
01-13 11:51:52.104 13252-13252/? I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
01-13 11:51:52.164 13252-13252/? I/Tinker.ServerUtils: with app key from manifest appKey:53d1f23ff386bc3c
01-13 11:51:52.164 13252-13252/? I/Tinker.ServerUtils: with app version from manifest appVersion:2016122101
01-13 11:51:52.174 13252-13252/? I/Tinker.VersionInfo: readVersionInfo file path:/data/data/com.yunshanghui.o2o/tinker_server/version.info, appVersion: 2016122101, uuid:25adc1d7-ee5d-4933-abc7-ee6228bb1491, abi:armeabi, patchVersion:2, patchMd5:524e105f2472db7e849cce3ce73dcb4b, grayValue:1, crashTimes:0, retryTimes:0
01-13 11:51:52.174 13252-13252/? W/Tinker.Debugger: debugger not attached cu == null
01-13 11:51:52.184 13252-13252/? W/Tinker.ServerClient: installTinkerServer, debug value: false, appVersion: 2016122101, appKey: 53d1f23ff386bc3c
01-13 11:51:52.184 13252-13252/? W/Tinker.Tinker: tinker patch directory: /data/data/com.yunshanghui.o2o/tinker
01-13 11:51:52.194 13252-13252/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0
01-13 11:51:52.194 13252-13252/? I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:524e105f2472db7e849cce3ce73dcb4b, newVersion:524e105f2472db7e849cce3ce73dcb4b, current:524e105f2472db7e849cce3ce73dcb4b
01-13 11:51:52.194 13252-13252/? I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
01-13 11:51:52.194 13252-13252/? I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/data/com.yunshanghui.o2o/tinker, code:0, cost:89
01-13 11:51:53.974 13314-13314/? W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
01-13 11:51:53.974 13314-13314/? W/Tinker.TinkerLoader: tinker safe mode preferName:tinker_own_config_com.yunshanghui.o2o:channel count:1
01-13 11:51:54.074 13314-13314/? I/Tinker.TinkerDexLoader: classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.yunshanghui.o2o-1/base.apk"],nativeLibraryDirectories=[/data/app/com.yunshanghui.o2o-1/lib/arm, /vendor/lib, /system/lib]]]
01-13 11:51:54.084 13314-13314/? I/Tinker.ClassLoaderAdder: after loaded classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/data/com.yunshanghui.o2o/tinker/patch-524e105f/dex/classes.dex.jar", zip file "/data/data/com.yunshanghui.o2o/tinker/patch-524e105f/dex/test.dex.jar", zip file "/data/app/com.yunshanghui.o2o-1/base.apk"],nativeLibraryDirectories=[/data/app/com.yunshanghui.o2o-1/lib/arm, /vendor/lib, /system/lib]]], dex size:2
01-13 11:51:54.084 13314-13314/? W/Tinker.ClassLoaderAdder: checkDexInstall result:true
01-13 11:51:54.084 13314-13314/? I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
01-13 11:51:54.154 13314-13314/? I/Tinker.ServerUtils: with app key from manifest appKey:53d1f23ff386bc3c
01-13 11:51:54.154 13314-13314/? I/Tinker.ServerUtils: with app version from manifest appVersion:2016122101
12-07 10:37:55.906 28423-28497/? E/Tinker.ClientImpl: tinker server sync respond:{"v":10}
12-07 10:37:55.906 28423-28497/? I/Tinker.ClientImpl: sync response in update:version:10
grayValue:null
conditions:
pause:false
rollback:false
12-07 10:37:55.916 28423-28497/? W/Tinker.ClientImpl: update return false, target version is not latest. current version is:10
12-07 10:37:55.916 28423-28497/? I/Tinker.ClientImpl: Needn't update, sync response is: version:10
grayValue:null
conditions:
pause:false
rollback:false
gray: 1
客户端上一个版本:1.6.4 ,thinker_id :iqc164,补丁版本:10,已删除
当前客户端版本:1.6.5,tinker_id:iqc165 ,补丁版本:0
我现在上传了一个1.6.5版本的补丁,但是请求服务器的补丁版本一直是 1.6.4_v10的补丁包。无法更新到1.6.5_1的版本。
03-06 16:22:29.947 12533-12533/? I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
03-06 16:22:29.967 12533-12533/? D/Tinker.DefaultAppLike: onBaseContextAttached:
03-06 16:22:29.977 12533-12533/? D/Tinker.DefaultAppLike: onCreate
03-06 16:22:29.997 12533-12533/? I/Tinker.ServerUtils: with app key from manifest appKey:0835895919045178
03-06 16:22:30.007 12533-12533/? I/Tinker.ServerUtils: with app version from manifest appVersion:V4.0.0Grey1062
03-06 16:22:30.007 12533-12533/? I/Tinker.VersionInfo: readVersionInfo file path:/data/user/0/com.jumper.fhrinstruments/tinker_server/0835895919045178_version.info, appVersion: V4.0.0Grey1062, uuid:80808c74-a180-4f39-bf99-a2f98062c07b, abi:armeabi-v7a, patchVersion:2, patchMd5:afc4e2a08522dc146ac326b0c370bb59, grayValue:1, crashTimes:0, retryTimes:0
03-06 16:22:30.027 12533-12533/? I/Tinker.Debugger: debugger attached
03-06 16:22:30.027 12533-12533/? D/Tinker.Debugger: getBoolean(): key=.com.tinker.debugtool.debug, value=true
03-06 16:22:30.027 12533-12533/? I/Tinker.ServerClient: installTinkerServer, debug value: true, appVersion: V4.0.0Grey1062, appKey: 0835895919045178
03-06 16:22:30.037 12533-12533/? W/Tinker.Tinker: tinker patch directory: /data/user/0/com.jumper.fhrinstruments/tinker
03-06 16:22:30.047 12533-12533/? I/Tinker.Tinker: try to install tinker, isEnable: true, version: 1.7.7
03-06 16:22:30.047 12533-12533/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0, systemOTA:false
03-06 16:22:30.047 12533-12533/? I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:afc4e2a08522dc146ac326b0c370bb59, newVersion:afc4e2a08522dc146ac326b0c370bb59, current:afc4e2a08522dc146ac326b0c370bb59
03-06 16:22:30.047 12533-12533/? I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
03-06 16:22:30.047 12533-12533/? I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/user/0/com.jumper.fhrinstruments/tinker, code:0, cost:172
03-06 16:22:30.047 12533-12533/? I/Tinker.TinkerPatch: Init TinkerPatch sdk success, version:1.1.4
03-06 16:22:30.177 12533-12533/? D/Tinker.DefaultAppLike: onTrimMemory level:5
03-06 16:22:30.437 12533-12533/? D/Tinker.DefaultAppLike: onTrimMemory level:80
03-06 16:22:30.557 12533-12533/? D/Tinker.UpgradePatchRetry: onPatchRetryLoad retry is not main process, just return
03-06 16:22:31.267 1430-3260/? I/ActivityManager: Force stopping com.tinker.debug.DebugToolApplication appid=10525 user=0: from pid 3683by app
03-06 16:22:31.267 1430-3260/? I/ActivityManager: Killing 11830:com.tinker.debug.DebugToolApplication/u0a525 (adj 0): stop com.tinker.debug.DebugToolApplicationfrom pid 3683by app
03-06 16:22:31.297 1430-3260/? I/ActivityManager: collectReceiverComponents for intent: Intent { act=android.intent.action.PACKAGE_RESTARTED dat=package:com.tinker.debug.DebugToolApplication flg=0x10 (has extras) }, receivers: null
**然后,一直放着不动,等会就提示 我的程序无效应(ANR),等待还是关闭
然后关闭应用,再重新开启应用,这时Patch 加载成功,并生效。不会出问题 。。**
手机:
一部华为 honor 7i ATH-TL00H
一部努比亚 nubia z7 mini
都是同样的效果。。
我现在再试试全量下发。。
TinkerPatch SDK 1.1.1
手机: 一加一代 android 7.1
log:
01-20 10:54:36.244 13729-13729/com.wdwd.wfx W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
01-20 10:54:36.245 13729-13729/com.wdwd.wfx D/Tinker.TinkerInternals: same fingerprint:oneplus/bacon/A0001:6.0.1/MHC19Q/ZNH2KAS1KN:user/release-keys
01-20 10:54:36.246 13729-13729/com.wdwd.wfx I/PatchInfo: rewritePatchInfoFile file path:/data/user/0/com.wdwd.wfx/tinker/patch.info , oldVer:e052c21afc22509f8282bc19fb193986, newVer:e052c21afc22509f8282bc19fb193986
01-20 10:54:36.250 13729-13729/com.wdwd.wfx W/Tinker.TinkerLoader: tinker safe mode preferName:tinker_own_config_com.wdwd.wfx count:1
01-20 10:54:36.260 13729-13729/com.wdwd.wfx I/Tinker.TinkerDexLoader: classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.wdwd.wfx-1/base.apk"],nativeLibraryDirectories=[/data/app/com.wdwd.wfx-1/lib/arm, /system/fake-libs, /data/app/com.wdwd.wfx-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]]
01-20 10:54:36.286 13729-13729/com.wdwd.wfx I/Tinker.ClassLoaderAdder: after loaded classloader: com.tencent.tinker.loader.AndroidNClassLoader[DexPathList[[zip file "/data/user/0/com.wdwd.wfx/tinker/patch-e052c21a/dex/classes.dex.jar", zip file "/data/user/0/com.wdwd.wfx/tinker/patch-e052c21a/dex/classes2.dex.jar", zip file "/data/user/0/com.wdwd.wfx/tinker/patch-e052c21a/dex/test.dex.jar", zip file "/data/app/com.wdwd.wfx-1/base.apk"],nativeLibraryDirectories=[/data/app/com.wdwd.wfx-1/lib/arm, /system/fake-libs, /data/app/com.wdwd.wfx-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]], dex size:3
01-20 10:54:36.287 13729-13729/com.wdwd.wfx W/Tinker.ClassLoaderAdder: checkDexInstall result:true
01-20 10:54:36.288 13729-13729/com.wdwd.wfx I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
01-20 10:54:36.292 13729-13729/com.wdwd.wfx D/Tinker.DefaultAppLike: onBaseContextAttached:
01-20 10:54:36.297 13729-13729/com.wdwd.wfx I/Tinker.ReflectApp: with app application from manifest applicationName:com.wdwd.wfx.application.ShopexApplication
01-20 10:54:36.322 13729-13729/com.wdwd.wfx I/Tinker.ServerUtils: with app key from manifest appKey:e2779049e87cf4af
01-20 10:54:36.323 13729-13729/com.wdwd.wfx I/Tinker.ServerUtils: with app version from manifest appVersion:2.7.3
01-20 10:54:36.325 13729-13729/com.wdwd.wfx I/Tinker.VersionInfo: readVersionInfo file path:/data/user/0/com.wdwd.wfx/tinker_server/version.info, appVersion: 2.7.3, uuid:9446bd16-d91e-4316-af4f-2defd51afe9d, abi:armeabi-v7a, patchVersion:0, patchMd5:, grayValue:3, crashTimes:0, retryTimes:0
01-20 10:54:36.332 13729-13729/com.wdwd.wfx E/ActivityThread: Failed to find provider info for com.tinker.debug.debugprovider
01-20 10:54:36.332 13729-13729/com.wdwd.wfx D/Tinker.Debugger: debugger not attached cu == null
01-20 10:54:36.333 13729-13729/com.wdwd.wfx I/Tinker.ServerClient: installTinkerServer, debug value: false, appVersion: 2.7.3, appKey: e2779049e87cf4af
01-20 10:54:36.340 13729-13729/com.wdwd.wfx W/Tinker.Tinker: tinker patch directory: /data/user/0/com.wdwd.wfx/tinker
01-20 10:54:36.347 13729-13729/com.wdwd.wfx I/Tinker.Tinker: try to install tinker, isEnable: true, version: 1.7.7
01-20 10:54:36.350 13729-13729/com.wdwd.wfx I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0, systemOTA:false
01-20 10:54:36.350 13729-13729/com.wdwd.wfx I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:, newVersion:e052c21afc22509f8282bc19fb193986, current:e052c21afc22509f8282bc19fb193986
01-20 10:54:36.351 13729-13729/com.wdwd.wfx I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
01-20 10:54:36.351 13729-13729/com.wdwd.wfx I/Tinker.DefaultLoadReporter: patch loadReporter onLoadPatchVersionChanged: patch version change from to e052c21afc22509f8282bc19fb193986
01-20 10:54:36.351 13729-13729/com.wdwd.wfx I/Tinker.DefaultLoadReporter: onLoadPatchVersionChanged, try kill all other process
01-20 10:54:36.353 13729-13729/com.wdwd.wfx E/Tinker.ServerUtils: reportTinkerApplySuccess, md5 is not equal
01-20 10:54:36.353 13729-13729/com.wdwd.wfx I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/user/0/com.wdwd.wfx/tinker, code:0, cost:117
01-20 10:54:36.355 13729-13729/com.wdwd.wfx E/Tinker.ReflectApp: replaceApplicationLike delegateClass:class com.tinkerpatch.sdk.loader.TinkerPatchApplicationLike
01-20 10:54:36.356 13729-13729/com.wdwd.wfx D/Tinker.DefaultAppLike: onCreate
tinkerpatch-gradle-plugin什么时候开源,谢谢。很想看看
rt
有的时候可以下发 有的时候不可以下发 请问 打基础包盒 差异包 apk文件名字之类的需要注意什么呢
已经集成了 TinkerPatch SDK,但是文档第一步的
TinkerServerManager.installTinkerServer(getApplication(), Tinker.with(getApplication()), 3);
这部分代码并不是sdk提供的,而是需要拷贝tinker-servier-sample里面的类 TinkerServerManager
使用tinkerpatch平台,补丁合成成功了,也生效了。但是报下面log上的错误。实时统计也统计不到合成成功或者说统计不准确,只有下载成功数。
机型:会议平板(市面比较少见)
系统:原生的Android 5.1
应用类型:Luancher。应用生命周期与系统相同。只有在开机的时候,启动Launcher,合成补丁文件。
该错误只有在合成补丁的当次出现,其余情况下没有出现。并未引起应用崩溃,现在发现最直观的影响是上报不成功。
log:
02-15 11:11:01.732 928-928/? E/ActivityThread: Failed to find provider info for com.tinker.debug.debugprovider
02-15 11:11:01.880 928-928/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: android.upedu.launcher, PID: 928
java.lang.RuntimeException: Unable to create application com.tinkerpatch.sdk.loader.TinkerPatchReflectApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4582)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5280)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference
at android.upedu.launcher.utils.CommonUtil.isServiceWorked(Unknown Source)
at android.upedu.launcher.utils.CommonUtil.startMultitaskService(Unknown Source)
at android.upedu.launcher.OnlineApp.onCreate(Unknown Source)
at com.tinkerpatch.sdk.loader.TinkerPatchReflectApplication.onCreate(Unknown Source)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4579)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5280)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)
02-15 11:11:01.880 928-928/? E/AndroidRuntime: Error reporting crash
android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:496)
at android.app.ActivityManagerProxy.handleApplicationCrash(ActivityManagerNative.java:4211)
at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:89)
at com.tencent.tinker.loader.TinkerUncaughtHandler.uncaughtException(Unknown Source)
at com.tinkerpatch.sdk.tinker.a.a.uncaughtException(Unknown Source)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
02-15 11:12:06.774 2238-2238/android.upedu.launcher W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
02-15 11:12:06.789 2238-2238/android.upedu.launcher D/Tinker.TinkerInternals: same fingerprint:cvtouchup/cvtouchup/cvtouchup:5.1.1/LMY49F/cvtouch01161612:userdebug/test-keys
02-15 11:12:06.790 2238-2238/android.upedu.launcher W/Tinker.TinkerLoader: tinker safe mode preferName:tinker_own_config_android.upedu.launcher count:1
02-15 11:12:06.805 2238-2238/android.upedu.launcher I/Tinker.TinkerDexLoader: classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/android.upedu.launcher-1/base.apk"],nativeLibraryDirectories=[/data/app/android.upedu.launcher-1/lib/arm, /vendor/lib, /system/lib]]]
02-15 11:12:06.834 2365-2365/? I/dex2oat: /system/bin/dex2oat --runtime-arg -classpath --runtime-arg --instruction-set=arm --instruction-set-features=div --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --dex-file=/data/user/0/android.upedu.launcher/tinker/patch-45d44dda/dex/classes.dex.jar --oat-fd=20 --oat-location=/data/user/0/android.upedu.launcher/tinker/patch-45d44dda/odex/classes.dex.dex --runtime-arg -Xms64m --runtime-arg -Xmx512m
02-15 11:12:11.856 2499-2499/? I/dex2oat: /system/bin/dex2oat --runtime-arg -classpath --runtime-arg --instruction-set=arm --instruction-set-features=div --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --dex-file=/data/user/0/android.upedu.launcher/tinker/patch-45d44dda/dex/test.dex.jar --oat-fd=20 --oat-location=/data/user/0/android.upedu.launcher/tinker/patch-45d44dda/odex/test.dex.dex --runtime-arg -Xms64m --runtime-arg -Xmx512m
02-15 11:12:11.874 2238-2238/android.upedu.launcher I/Tinker.ClassLoaderAdder: after loaded classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/user/0/android.upedu.launcher/tinker/patch-45d44dda/dex/classes.dex.jar", zip file "/data/user/0/android.upedu.launcher/tinker/patch-45d44dda/dex/test.dex.jar", zip file "/data/app/android.upedu.launcher-1/base.apk"],nativeLibraryDirectories=[/data/app/android.upedu.launcher-1/lib/arm, /vendor/lib, /system/lib]]], dex size:2
02-15 11:12:11.875 2238-2238/android.upedu.launcher W/Tinker.ClassLoaderAdder: checkDexInstall result:true
02-15 11:12:11.876 2238-2238/android.upedu.launcher W/Tinker.ResourcePatcher: try to clear typedArray cache!
02-15 11:12:11.876 2238-2238/android.upedu.launcher E/Tinker.ResourcePatcher: checkResUpdate success, found test resource assets file only_use_to_test_tinker_resource.txt
02-15 11:12:11.877 2238-2238/android.upedu.launcher I/Tinker.ResourceLoader: monkeyPatchExistingResources resource file:/data/user/0/android.upedu.launcher/tinker/patch-45d44dda/res/resources.apk, use time: 2
02-15 11:12:11.877 2238-2238/android.upedu.launcher I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
02-15 11:12:11.880 2238-2238/android.upedu.launcher D/Tinker.DefaultAppLike: onBaseContextAttached:
02-15 11:12:11.883 2238-2238/android.upedu.launcher I/Tinker.ReflectApp: with app application from manifest applicationName:android.upedu.launcher.OnlineApp
02-15 11:12:11.885 2238-2238/android.upedu.launcher E/Tinker.ReflectApp: replaceApplicationLike delegateClass:class com.tinkerpatch.sdk.loader.TinkerPatchApplicationLike
02-15 11:12:11.885 2238-2238/android.upedu.launcher D/Tinker.DefaultAppLike: onCreate
02-15 11:12:11.895 2238-2238/android.upedu.launcher I/Tinker.ServerUtils: with app key from manifest appKey:bce9c166cd7ae416
02-15 11:12:11.896 2238-2238/android.upedu.launcher I/Tinker.ServerUtils: with app version from manifest appVersion:1.43
02-15 11:12:11.897 2238-2238/android.upedu.launcher I/Tinker.VersionInfo: readVersionInfo file path:/data/user/0/android.upedu.launcher/tinker_server/version.info, appVersion: 1.43, uuid:d5df078a-2678-4b6d-8e1e-8ab74cce8717, abi:armeabi-v7a, patchVersion:6, patchMd5:45d44dda5e512e7b91893e523c8423ab, grayValue:5, crashTimes:1, retryTimes:0
02-15 11:12:11.900 2238-2238/android.upedu.launcher E/ActivityThread: Failed to find provider info for com.tinker.debug.debugprovider
02-15 11:12:11.900 2238-2238/android.upedu.launcher D/Tinker.Debugger: debugger not attached cu == null
02-15 11:12:11.900 2238-2238/android.upedu.launcher I/Tinker.ServerClient: installTinkerServer, debug value: false, appVersion: 1.43, appKey: bce9c166cd7ae416
02-15 11:12:11.903 2238-2238/android.upedu.launcher W/Tinker.Tinker: tinker patch directory: /data/user/0/android.upedu.launcher/tinker
02-15 11:12:11.906 2238-2238/android.upedu.launcher I/Tinker.Tinker: try to install tinker, isEnable: true, version: 1.7.7
02-15 11:12:11.908 2238-2238/android.upedu.launcher I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0, systemOTA:false
02-15 11:12:11.908 2238-2238/android.upedu.launcher I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:45d44dda5e512e7b91893e523c8423ab, newVersion:45d44dda5e512e7b91893e523c8423ab, current:45d44dda5e512e7b91893e523c8423ab
02-15 11:12:11.908 2238-2238/android.upedu.launcher I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
02-15 11:12:11.908 2238-2238/android.upedu.launcher I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/user/0/android.upedu.launcher/tinker, code:0, cost:4402
02-15 11:12:11.912 2238-2238/android.upedu.launcher W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1709 android.content.ContextWrapper.startService:516 android.upedu.launcher.utils.CommonUtil.startMultitaskService:-1 android.upedu.launcher.OnlineApp.onCreate:-1 com.tinkerpatch.sdk.loader.TinkerPatchReflectApplication.onCreate:-1
02-15 11:12:12.305 2514-2514/android.upedu.launcher:channel W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
02-15 11:12:12.310 2514-2514/android.upedu.launcher:channel D/Tinker.TinkerInternals: same fingerprint:cvtouchup/cvtouchup/cvtouchup:5.1.1/LMY49F/cvtouch01161612:userdebug/test-keys
02-15 11:12:12.310 2514-2514/android.upedu.launcher:channel W/Tinker.TinkerLoader: tinker safe mode preferName:tinker_own_config_android.upedu.launcher:channel count:1
02-15 11:12:12.332 2514-2514/android.upedu.launcher:channel I/Tinker.TinkerDexLoader: classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/android.upedu.launcher-1/base.apk"],nativeLibraryDirectories=[/data/app/android.upedu.launcher-1/lib/arm, /vendor/lib, /system/lib]]]
02-15 11:12:12.335 2514-2514/android.upedu.launcher:channel I/Tinker.ClassLoaderAdder: after loaded classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/user/0/android.upedu.launcher/tinker/patch-45d44dda/dex/classes.dex.jar", zip file "/data/user/0/android.upedu.launcher/tinker/patch-45d44dda/dex/test.dex.jar", zip file "/data/app/android.upedu.launcher-1/base.apk"],nativeLibraryDirectories=[/data/app/android.upedu.launcher-1/lib/arm, /vendor/lib, /system/lib]]], dex size:2
02-15 11:12:12.335 2514-2514/android.upedu.launcher:channel W/Tinker.ClassLoaderAdder: checkDexInstall result:true
02-15 11:12:12.337 2514-2514/android.upedu.launcher:channel W/Tinker.ResourcePatcher: try to clear typedArray cache!
02-15 11:12:12.337 2514-2514/android.upedu.launcher:channel E/Tinker.ResourcePatcher: checkResUpdate success, found test resource assets file only_use_to_test_tinker_resource.txt
02-15 11:12:12.337 2514-2514/android.upedu.launcher:channel I/Tinker.ResourceLoader: monkeyPatchExistingResources resource file:/data/user/0/android.upedu.launcher/tinker/patch-45d44dda/res/resources.apk, use time: 1
02-15 11:12:12.338 2514-2514/android.upedu.launcher:channel I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok!
02-15 11:12:12.339 2514-2514/android.upedu.launcher:channel D/Tinker.DefaultAppLike: onBaseContextAttached:
02-15 11:12:12.344 2514-2514/android.upedu.launcher:channel I/Tinker.ReflectApp: with app application from manifest applicationName:android.upedu.launcher.OnlineApp
02-15 11:12:12.348 2514-2514/android.upedu.launcher:channel E/Tinker.ReflectApp: replaceApplicationLike delegateClass:class com.tinkerpatch.sdk.loader.TinkerPatchApplicationLike
02-15 11:12:12.348 2514-2514/android.upedu.launcher:channel D/Tinker.DefaultAppLike: onCreate
02-15 11:12:12.359 2514-2514/android.upedu.launcher:channel I/Tinker.ServerUtils: with app key from manifest appKey:bce9c166cd7ae416
02-15 11:12:12.360 2514-2514/android.upedu.launcher:channel I/Tinker.ServerUtils: with app version from manifest appVersion:1.43
02-15 11:12:12.361 2514-2514/android.upedu.launcher:channel I/Tinker.VersionInfo: readVersionInfo file path:/data/user/0/android.upedu.launcher/tinker_server/version.info, appVersion: 1.43, uuid:d5df078a-2678-4b6d-8e1e-8ab74cce8717, abi:armeabi-v7a, patchVersion:6, patchMd5:45d44dda5e512e7b91893e523c8423ab, grayValue:5, crashTimes:1, retryTimes:0
02-15 11:12:12.364 2514-2514/android.upedu.launcher:channel E/ActivityThread: Failed to find provider info for com.tinker.debug.debugprovider
02-15 11:12:12.364 2514-2514/android.upedu.launcher:channel D/Tinker.Debugger: debugger not attached cu == null
02-15 11:12:12.364 2514-2514/android.upedu.launcher:channel I/Tinker.ServerClient: installTinkerServer, debug value: false, appVersion: 1.43, appKey: bce9c166cd7ae416
02-15 11:12:12.368 2514-2514/android.upedu.launcher:channel W/Tinker.Tinker: tinker patch directory: /data/user/0/android.upedu.launcher/tinker
02-15 11:12:12.371 2514-2514/android.upedu.launcher:channel I/Tinker.Tinker: try to install tinker, isEnable: true, version: 1.7.7
02-15 11:12:12.373 2514-2514/android.upedu.launcher:channel I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0, systemOTA:false
02-15 11:12:12.373 2514-2514/android.upedu.launcher:channel I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:45d44dda5e512e7b91893e523c8423ab, newVersion:45d44dda5e512e7b91893e523c8423ab, current:45d44dda5e512e7b91893e523c8423ab
02-15 11:12:12.373 2514-2514/android.upedu.launcher:channel I/Tinker.TinkerLoadResult: oh yeah, tinker load all success
02-15 11:12:12.373 2514-2514/android.upedu.launcher:channel I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/user/0/android.upedu.launcher/tinker, code:0, cost:58
02-15 11:12:12.959 2514-2514/android.upedu.launcher:channel D/Tinker.UpgradePatchRetry: onPatchRetryLoad retry is not main process, just return
02-15 11:12:14.299 2238-2238/android.upedu.launcher E/Tinker: 网络连接成功,开始请求补丁文件
02-15 11:12:14.669 2238-2238/android.upedu.launcher W/Tinker.UpgradePatchRetry: onPatchRetryLoad patch file: /data/user/0/android.upedu.launcher/tinker_temp/temp.apk is not exist, just return
02-15 11:12:14.683 2238-2238/android.upedu.launcher D/Tinker.UrlConnectionFetcher: loadData from url: http://q.tinkerpatch.com/bce9c166cd7ae416/1.43?d=d5df078a-2678-4b6d-8e1e-8ab74cce8717&v=1487128334683, method:GET, body:null
02-15 11:12:14.693 2238-2238/android.upedu.launcher D/Tinker.UrlConnectionFetcher: loadData from url: http://q.tinkerpatch.com/bce9c166cd7ae416/1.43?d=d5df078a-2678-4b6d-8e1e-8ab74cce8717&v=1487128334693, method:GET, body:null
02-15 11:12:14.872 2238-2651/android.upedu.launcher D/Tinker.UrlConnectionFetcher: response code 200 msg: OK
02-15 11:12:14.872 2238-2651/android.upedu.launcher E/Tinker.ClientImpl: tinker server sync respond:{"v":6}
02-15 11:12:14.872 2238-2651/android.upedu.launcher I/Tinker.ClientImpl: sync response in update:version:6
grayValue:null
conditions:
pause:false
rollback:false
02-15 11:12:14.872 2238-2651/android.upedu.launcher I/Tinker.VersionInfo: VersionCheck: target version 6 is not latest. current version is 6
02-15 11:12:14.872 2238-2651/android.upedu.launcher I/Tinker.ClientImpl: Needn't update, sync response is: version:6
grayValue:null
conditions:
pause:false
rollback:false
gray: 5
02-15 11:12:14.959 2238-2651/android.upedu.launcher D/Tinker.UrlConnectionFetcher: response code 200 msg: OK
02-15 11:12:14.959 2238-2651/android.upedu.launcher E/Tinker.ClientImpl: tinker server sync respond:{"v":6}
02-15 11:12:14.959 2238-2651/android.upedu.launcher I/Tinker.ClientImpl: sync response in update:version:6
grayValue:null
conditions:
pause:false
rollback:false
02-15 11:12:14.959 2238-2651/android.upedu.launcher I/Tinker.VersionInfo: VersionCheck: target version 6 is not latest. current version is 6
02-15 11:12:14.959 2238-2651/android.upedu.launcher I/Tinker.ClientImpl: Needn't update, sync response is: version:6
grayValue:null
conditions:
pause:false
rollback:false
gray: 5
application:
package android.upedu.launcher;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.Application;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Environment;
import android.support.multidex.MultiDex;
import android.upedu.launcher.activity.CrashActivity;
import android.upedu.launcher.net.HttpUtils;
import android.upedu.launcher.utils.CommonUtil;
import android.upedu.launcher.utils.SharedPreferencesDownLoadUtil;
import android.upedu.launcher.utils.SharedPreferencesUtil;
import com.nostra13.universalimageloader.cache.memory.impl.LruMemoryCache;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.DisplayImageOptions.Builder;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import com.nostra13.universalimageloader.core.assist.QueueProcessingType;
import com.nostra13.universalimageloader.core.download.BaseImageDownloader;
import com.tencent.tinker.loader.app.ApplicationLike;
import com.tinkerpatch.sdk.TinkerPatch;
import com.tinkerpatch.sdk.loader.TinkerPatchApplicationLike;
import com.umeng.analytics.MobclickAgent;
import com.umeng.message.IUmengCallback;
import com.umeng.message.IUmengRegisterCallback;
import com.umeng.message.PushAgent;
import java.io.File;
import java.util.LinkedList;
import cat.ereza.customactivityoncrash.CustomActivityOnCrash;
public class OnlineApp extends Application {
public Context context;
@SuppressLint("StaticFieldLeak")
public static OnlineApp myApp;
private static final String KEY_HEADS_UP = "headsUp";
// public ExecutorService instance;
private final LinkedList<Activity> mActivitys = new LinkedList<>();
//显示图片的配置
public Builder builder;
//ImageLoader对象
public ImageLoader imageLoader;
private DisplayImageOptions options;
private static final String TAG = "Tinker.Application";
private ApplicationLike tinkerApplicationLike;
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
//you must install multiDex whatever tinker is installed!
MultiDex.install(base);
}
@Override
public void onCreate() {
super.onCreate();
myApp = this;
context = getApplicationContext();
initTinker();//初始化tinker
//初始化时先在文件中删除pushToken
SharedPreferencesUtil.getInstance().editPutString("pushToken", "");
CommonUtil.startMultitaskService(context);//初始化多任务的service
// instance = Executors.newFixedThreadPool(10);
//volley初始化 diskLruCache初始化
HttpUtils.getInstance(context);
//初始化文件下载
SharedPreferencesDownLoadUtil.getInstance().editClear();
//ACRA初始化
CustomActivityOnCrash.install(this);
CustomActivityOnCrash.setErrorActivityClass(CrashActivity.class);
//友盟
PushAgent mPushAgent = PushAgent.getInstance(this);
//注册推送服务,每次调用register方法都会回调该接口
mPushAgent.register(new IUmengRegisterCallback() {
@Override
public void onSuccess(String deviceToken) {
//注册成功会返回device token
SharedPreferencesUtil.getInstance().editPutString("pushToken", deviceToken);
}
@Override
public void onFailure(String s, String s1) {
}
});
//添加推送SDK自己的日志打印关闭方法
mPushAgent.setDebugMode(false);
//在用户未登录时不通过Push去推送
mPushAgent.disable(new IUmengCallback() {
@Override
public void onSuccess() {
}
@Override
public void onFailure(String s, String s1) {
}
});
////
MobclickAgent.setScenarioType(context, MobclickAgent.EScenarioType.E_UM_NORMAL);
MobclickAgent.setDebugMode(true);
//显示图片的配置
builder = new Builder()
.cacheInMemory(true)
.cacheOnDisk(true)
.bitmapConfig(Bitmap.Config.RGB_565);
options=new DisplayImageOptions.Builder()
.cacheInMemory(true)
.cacheOnDisk(true)
.bitmapConfig(Bitmap.Config.RGB_565)
.build();
final File cacheDir = new File(Environment.getExternalStorageDirectory().getPath() + "/Upedu/picCache");
imageLoader = ImageLoader.getInstance();
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context)
.memoryCacheExtraOptions(480, 800) // default = device screen dimensions
.diskCacheExtraOptions(480, 800, null)
.threadPoolSize(3) // default
.threadPriority(Thread.NORM_PRIORITY - 1) // default
.tasksProcessingOrder(QueueProcessingType.FIFO) // default
.denyCacheImageMultipleSizesInMemory()
.memoryCache(new LruMemoryCache(2 * 1024 * 1024))
.memoryCacheSize(2 * 1024 * 1024)
.memoryCacheSizePercentage(13) // default
.diskCacheFileCount(500)
.diskCacheSize(200 * 1024 * 1024)
// .discCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default
.imageDownloader(new BaseImageDownloader(context)) // default
// .imageDecoder(new BaseImageDecoder()) // default
.defaultDisplayImageOptions(DisplayImageOptions.createSimple()) // default
.writeDebugLogs()
.defaultDisplayImageOptions(options)
.build();
imageLoader.init(config);//全局初始化此配置
//用于控制splash界面的显示
SharedPreferencesUtil.getInstance().editPutBoolean("isStartuped", true);
//添加本地崩溃日志 注意在打包的时候需要注释掉
// CrashHandler crashHandler = CrashHandler.getInstance() ;
// crashHandler.init(this) ;
}
private void initTinker(){
//我们可以从这里获得Tinker加载过程的信息
tinkerApplicationLike = TinkerPatchApplicationLike.getTinkerPatchApplicationLike();
//开始检查是否有补丁,这里配置的是每隔访问3小时服务器是否有更新。
TinkerPatch.init(tinkerApplicationLike)
.reflectPatchLibrary();
TinkerPatch.with().fetchPatchUpdate(true);
}
/**
* 获得当前进程的名字
*
* @param context
* @return 进程号
*/
public static String getCurProcessName(Context context) {
int pid = android.os.Process.myPid();
ActivityManager activityManager = (ActivityManager) context
.getSystemService(Context.ACTIVITY_SERVICE);
for (ActivityManager.RunningAppProcessInfo appProcess : activityManager
.getRunningAppProcesses()) {
if (appProcess.pid == pid) {
return appProcess.processName;
}
}
return null;
}
/**
* Activity开启时添加Activity到集合
*
* @param activity
*/
public void addActivity(Activity activity) {
mActivitys.addFirst(activity);
}
/**
* Activity退出时清除集合中的Activity.
*
* @param activity
*/
public void removeActivity(Activity activity) {
mActivitys.remove(activity);
}
public void exit() {
for (Activity activity : mActivitys) {
activity.finish();
}
}
}
CommonUtil:
package android.upedu.launcher.utils;
import android.app.ActivityManager;
import android.content.Context;
import android.content.Intent;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.ColorMatrix;
import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.StateListDrawable;
import android.os.Bundle;
import android.upedu.launcher.base.BaseFragment;
import android.upedu.launcher.service.MultitaskService;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;
import android.widget.ListAdapter;
import android.widget.ListView;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.util.ArrayList;
public class CommonUtil {
/**
* 根据手机的分辨率从 dp 的单位 转成为 px(像素)
*/
public static int dip2px(Context context, float dpValue) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (dpValue * scale + 0.5f);
}
/**
* 根据手机的分辨率从 px(像素) 的单位 转成为 dp
*/
public static int px2dip(Context context, float pxValue) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (pxValue / scale + 0.5f);
}
public static int getScreenPicHeight(int screenWidth, Bitmap bitmap) {
int picWidth = bitmap.getWidth();
int picHeight = bitmap.getHeight();
int picScreenHeight = 0;
picScreenHeight = (screenWidth * picHeight) / picWidth;
return picScreenHeight;
}
private static Drawable createDrawable(Drawable d, Paint p) {
BitmapDrawable bd = (BitmapDrawable) d;
Bitmap b = bd.getBitmap();
Bitmap bitmap = Bitmap.createBitmap(bd.getIntrinsicWidth(),
bd.getIntrinsicHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
canvas.drawBitmap(b, 0, 0, p); // 关键代码,使用新的Paint画原图,
return new BitmapDrawable(bitmap);
}
/**
* 设置Selector。 本次只增加点击变暗的效果,注释的代码为更多的效果
*/
public static StateListDrawable createSLD(Context context, Drawable drawable) {
StateListDrawable bg = new StateListDrawable();
int brightness = 50 - 127;
ColorMatrix cMatrix = new ColorMatrix();
cMatrix.set(new float[]{1, 0, 0, 0, brightness, 0, 1, 0, 0,
brightness,// 改变亮度
0, 0, 1, 0, brightness, 0, 0, 0, 1, 0});
Paint paint = new Paint();
paint.setColorFilter(new ColorMatrixColorFilter(cMatrix));
Drawable normal = drawable;
Drawable pressed = createDrawable(drawable, paint);
bg.addState(new int[]{android.R.attr.state_pressed,}, pressed);
bg.addState(new int[]{android.R.attr.state_focused,}, pressed);
bg.addState(new int[]{android.R.attr.state_selected}, pressed);
bg.addState(new int[]{}, normal);
return bg;
}
/**
* 从assets目录中获取图片
*
* @param ct ct
* @param fileName fileName
* @return 返回值
*/
public static Bitmap getImageFromAssetsFile(Context ct, String fileName) {
Bitmap image = null;
AssetManager am = ct.getAssets();
try {
InputStream is = am.open(fileName);
image = BitmapFactory.decodeStream(is);
is.close();
} catch (IOException e) {
e.printStackTrace();
}
return image;
}
// public static <Params, Progress, Result> void executeAsyncTask(
// AsyncTask<Params, Progress, Result> task, Params... params) {
// if (Build.VERSION.SDK_INT >= 11) {
// task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, params);
// } else {
// task.execute(params);
// }
// }
// public static boolean hasToken(Context ct) {
// String token = SharePrefUtil.getString(ct, "token", "");
// if (StringUtil.isEmpty(token)) {
// return false;
// } else {
// return true;
// }
// }
public static void setListViewHeightBasedOnChildren(ListView listView) {
// 获取ListView对应的Adapter
ListAdapter listAdapter = listView.getAdapter();
if (listAdapter == null) {
return;
}
int totalHeight = 0;
for (int i = 0; i < listAdapter.getCount(); i++) { // listAdapter.getCount()返回数据项的数目
View listItem = listAdapter.getView(i, null, listView);
listItem.measure(0, 0); // 计算子项View 的宽高
totalHeight += listItem.getMeasuredHeight(); // 统计所有子项的总高度
}
ViewGroup.LayoutParams params = listView.getLayoutParams();
params.height = totalHeight
+ (listView.getDividerHeight() * (listAdapter.getCount() - 1));
// listView.getDividerHeight()获取子项间分隔符占用的高度
// params.height最后得到整个ListView完整显示需要的高度
listView.setLayoutParams(params);
}
public static void setGridViewHeightBasedOnChildren(Context context, GridView gridView, int numColumns) {
ListAdapter gridAdapter = gridView.getAdapter();
if (gridAdapter == null) {
// pre-condition
return;
}
View gridItem = gridAdapter.getView(0, null, gridView);
gridItem.measure(0, 0);
int totalHeight = gridItem.getMeasuredHeight() * ((gridAdapter.getCount() - 1) / numColumns + 1);
ViewGroup.LayoutParams params = gridView.getLayoutParams();
params.height = totalHeight + CommonUtil.dip2px(context, 20);
gridView.setLayoutParams(params);
}
public static void saveMyBitmap(Bitmap mBitmap, String picPath) {
File f = new File(picPath);
FileOutputStream fOut = null;
try {
fOut = new FileOutputStream(f);
if (fOut != null) {
mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, fOut);
fOut.flush();
fOut.close();
}
} catch (FileNotFoundException e) {
e.printStackTrace();
}catch(IOException e){
e.printStackTrace();
}
}
/**
* 向指定的fragment传递string类型的数据
* @param fragment fragment
* @param key key
* @param string string
* @return 返回值
*/
public static BaseFragment addBundleString(BaseFragment fragment, String key, String string){
Bundle args = new Bundle();
args.putString(key, string);
fragment.setArguments(args);
return fragment;
}
/**
* 向指定的fragment传递对象类型的数据(必须实现Serializable接口)
* @param fragment fragment
* @param key key
* @param object object
* @param <T> 泛型
* @return 返回值
*/
public static <T> BaseFragment addBundleSerializable(BaseFragment fragment,String key,T object){
Bundle args = new Bundle();
args.putSerializable(key, (Serializable) object);
fragment.setArguments(args);
return fragment;
}
/**
* 启动MultitaskService
* @param context 上下文
*/
public static void startMultitaskService(Context context){
if(!CommonUtil.isServiceWorked("android.upedu.launcher.service.MultitaskService",context)) {
Intent service = new Intent(context, MultitaskService.class);
context.startService(service);
}
}
/**
* 判断多任务service是否存活
* @param serviceName service名
* @return true存在
*/
public static boolean isServiceWorked(String serviceName,Context context) {
ActivityManager mManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
ArrayList<ActivityManager.RunningServiceInfo> runningService =
(ArrayList<ActivityManager.RunningServiceInfo>) mManager.getRunningServices(Integer.MAX_VALUE);
for (int i = 0; i < runningService.size(); i++) {
if (runningService.get(i).service.getClassName().equals(serviceName)) {
return true;
}
}
return false;
}
}
我遇到了如下的问题。很是奇怪。
java.util.UnknownFormatConversionException: Conversion = '/' at java.util.Formatter$FormatSpecifier.conversion(Formatter.java:2730) at java.util.Formatter$FormatSpecifier.<init>(Formatter.java:2759) at java.util.Formatter$FormatSpecifierParser.<init>(Formatter.java:2591) at java.util.Formatter.parse(Formatter.java:2524) at java.util.Formatter.format(Formatter.java:2472) at java.util.Formatter.format(Formatter.java:2426) at java.lang.String.format(String.java:2626) at com.tencent.tinker.lib.util.TinkerLog$1.i(SourceFile:36) at com.tencent.tinker.lib.util.TinkerLog.i(SourceFile:99) at com.tinkerpatch.sdk.server.callback.TinkerPatchRequestCallback.onPatchSyncFail(SourceFile:218) at com.tinkerpatch.sdk.server.a.a$1.a(SourceFile:159) at com.tinkerpatch.sdk.server.a.a$2.a(SourceFile:208) at com.tinkerpatch.sdk.server.c.a$1.a(SourceFile:65) at com.tinkerpatch.sdk.server.c.a$a.run(SourceFile:136) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761)
终于知道怎么回事了
各位大神求助,引入tinker后工程编译时
Error:Execution failed for task ':app:processDefaultConfigDebugManifest'.
Can't find AppVersion in your config, is there match variantName in tinkerpatchSupport config?
tinker version 1.1.0
tinkerpatchSupport {
/** 可以在debug的时候关闭 tinkerPatch **/
tinkerEnable = true
reflectApplication = true
appKey = "1782400ad784c933"
autoBackupApkPath = "${bakPath}"
baseApkInfos {
item {
variantName = "debug"
appVersion = "1.0.0"
def pathPrefix = "${bakPath}/${baseInfo}/${variantName}/"
def name = "${project.name}-${variantName}"
baseApkFile = "${pathPrefix}/${name}.apk"
baseProguardMappingFile = "${pathPrefix}/${name}-mapping.txt"
baseResourceRFile = "${pathPrefix}/${name}-R.txt"
}
item {
variantName = "release"
appVersion = "1.0.0"
def pathPrefix = "${bakPath}/${baseInfo}/${variantName}/"
def name = "${project.name}-${variantName}"
baseApkFile = "${pathPrefix}/${name}.apk"
baseProguardMappingFile = "${pathPrefix}/${name}-mapping.txt"
baseResourceRFile = "${pathPrefix}/${name}-R.txt"
}
}
请问有补丁合成成功的回调函数吗?
http://tinkerpatch.com 上统计的成功数是0,过滤log看到一个错误Failed to find provider info for com.tinker.debug.debugprovider,不知道跟着错误有没有关习
版本 com.tencent.tinker:tinker-server-android:0.3.2
在使用TinkerPatch时,看到文档中有个这步骤:
1.运行 assembleRelease task 构建基准包(请在发布前确保更新tinkerpatchSupport中的appVersion),tinkerPatch会基于你填入的autoBackupApkPath自动备份基础包信息到相应的文件夹,包含:apk文件、R.txt文件和mapping.txt文件 (注:mapping.txt是proguard的产物,如果你没有开启proguard则不会有这个文件�)
2.若想发布补丁包, 只需将自动保存下来的文件分别填到tinkerpatchSupport中的baseApkFile、baseProguardMappingFile和baseResourceRFile 参数中;
3.运行 tinkerPatchRelease task 构建补丁包,补丁包将位于 build/outputs/tinkerPatch下。
请问第三步中 “运行 tinkerPatchRelease task” 该怎么运行?与第一步中的 “运行 assembleRelease task” 有什么区别吗
代码用到了databinding,不打补丁没有问题,打了补丁出现了一些异常,但也不是全都异常,很难说明,大致是一个单选按钮组绑定了数据来控制是否可以点击,这部分代码没有任何修改,正常打的包在vivo上没问题,打了补丁就不行了,明明应该能点击的变成不能点击,目前只在vivo上发现这个问题,其它手机上没问题
RT
http://q.tinkerpatch.com/6d41ba325645258b/3.0.0?d=afdc998e-f384-4900-aab1-8bd0f6b9ef83&v=1480147178073 请帮忙查看下 我上传了补丁,但是一直都是FileNotFoundExecption
错误日志如下:
12-07 10:26:13.042 27817-28647/E/Tinker.ClientImpl: tinker server sync respond:{"e":1}
12-07 10:26:13.043 27817-28647/ I/Tinker.ClientImpl: sync response in update:version:
grayValue:null
conditions:
pause:false
rollback:true
执行tinkerPatchRelease task报如下异常:
com.tencent.tinker.build.util.TinkerPatchException: no dex, so or resource pattern are found
at com.tencent.tinker.build.patch.Configuration.checkInputPatternParameter(Configuration.java:330)
at com.tencent.tinker.build.patch.Configuration.<init>(Configuration.java:227)
at com.tencent.tinker.build.patch.Runner.loadConfigFromGradle(Runner.java:88)
at com.tencent.tinker.build.patch.Runner.run(Runner.java:45)
at com.tencent.tinker.build.patch.Runner.gradleRun(Runner.java:41)
at com.tencent.tinker.build.patch.Runner$gradleRun.call(Unknown Source)
at com.tencent.tinker.build.gradle.task.TinkerPatchSchemaTask.tinkerPatch(TinkerPatchSchemaTask.groovy:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:621)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:604)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:46)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:58)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:237)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
稍查了下源码:
private void checkInputPatternParameter() throws TinkerPatchException {
if (mSoFilePattern.isEmpty() && mDexFilePattern.isEmpty() && mResFilePattern.isEmpty()) {
throw new TinkerPatchException("no dex, so or resource pattern are found");
}
if (mLargeModSize <= 0) {
throw new TinkerPatchException("largeModSize must be larger than 0");
}
}
这里可能的原因?
How to fix it?
2 java.net.InetAddress.lookupHostByName(InetAddress.java:471)
3 ......
4 Caused by:
5 android.system.ErrnoException:android_getaddrinfo failed: EACCES (Permission denied)
6 libcore.io.Posix.android_getaddrinfo(Native Method)
7 libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55)
8 java.net.InetAddress.lookupHostByName(InetAddress.java:445)
9 java.net.InetAddress.getAllByNameImpl(InetAddress.java:259)
10 java.net.InetAddress.getAllByName(InetAddress.java:221)
11 com.android.okhttp.HostResolver$1.getAllByName(HostResolver.java:29)
12 com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:233)
13 com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:125)
14 com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:277)
15 com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:215)
16 com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:391)
17 com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
18 com.tinkerpatch.sdk.server.b.a$a.run(SourceFile:119)
19 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
20 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
21 java.lang.Thread.run(Thread.java:818)
我发现锁屏后会执行这段代码,求解
public void rollbackPatchDirectly() { TinkerServerClient client = TinkerServerClient.get(); final Context context = client.getContext(); final Tinker tinker = client.getTinker(); //restart now tinker.cleanPatch(); ShareTinkerInternals.killAllOtherProcess(context); android.os.Process.killProcess(android.os.Process.myPid()); }
你好我想知道TinkerPatch是否支持新建类和资源呢
项目中配置了:
splits {
abi {
enable true
reset()
include 'armeabi-v7a', "armeabi"
}
}
并且配置了productFlavors的情况下会
Gradle project sync failed. Error:Cannot invoke method doFirst() on null object
需要后台api支持。
java.util.MissingFormatArgumentException: Format specifier: 22d
at java.util.Formatter.getArgument(Formatter.java:1111)
at java.util.Formatter.doFormat(Formatter.java:1076)
at java.util.Formatter.format(Formatter.java:1042)
at java.util.Formatter.format(Formatter.java:1011)
at java.lang.String.format(String.java:1999)
at java.lang.String.format(String.java:1973)
at com.tencent.tinker.lib.util.TinkerLog$1.w(TinkerLog.java:49)
at com.tencent.tinker.lib.util.TinkerLog.w(TinkerLog.java:93)
at com.tinkerpatch.sdk.server.callback.TinkerPatchRequestCallback.onPatchSyncFail(SourceFile:219)
at com.tinkerpatch.sdk.server.a.a$1.onLoadFailed(SourceFile:200)
at com.tinkerpatch.sdk.server.a.a$2.onLoadFailed(SourceFile:258)
at com.tinkerpatch.sdk.server.b.a$1.onLoadFailed(SourceFile:65)
at com.tinkerpatch.sdk.server.b.a$a.run(SourceFile:126)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.