Tencent / tinker

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

使用android.arch.navigation的navigation组件,打release包报错 #915

Closed xingstarx closed 6 years ago

xingstarx commented 6 years ago

Issue/提问须知

在提交issue之前,我们应该先查询是否已经有相关的issue以及常见问题。提交issue时,我们需要写明issue的原因,以及编译或运行过程的日志(加载进程以及Patch进程)。issue需要以下面的格式:

异常类型:app运行时异常/编译异常
编译异常
手机型号:如:Nexus 5(如是编译异常,则可以不填)

手机系统版本:如:Android 5.0 (如是编译异常,则可以不填)

tinker版本:如:1.7.7
1.9.8
gradle版本:如:2.10
3.1.3
是否使用热更新SDK: 如 TinkerPatch SDK 或者 Bugly SDK

系统:如:Mac
Mac
堆栈/日志:

:sdk:transformDataBindingWithDataBindingMergeArtifactsForRelease (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 0.031 secs. :sdk:kaptReleaseKotlin (Thread[Task worker for ':' Thread 2,5,main]) started.

Task :app:tinkerProcessReleaseResourceId FAILED Putting task artifact state for task ':app:tinkerProcessReleaseResourceId' into context took 0.0 secs. Up-to-date check for task ':app:tinkerProcessReleaseResourceId' took 0.0 secs. It is not up-to-date because: Task has not declared any outputs. we build app apk with apply resource mapping file /Users/xingxing/xxx/xxx/app/tinkerApk/app-release-1.0.0-R.txt

:app:tinkerProcessReleaseResourceId (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.357 secs.

Task :sdk:kaptReleaseKotlin Putting task artifact state for task ':sdk:kaptReleaseKotlin' into context took 0.0 secs. Up-to-date check for task ':sdk:kaptReleaseKotlin' took 0.394 secs. It is not up-to-date because: Task ':sdk:kaptReleaseKotlin' class path has changed from 946a35d3f636307fdacab3a365fe4cf8 to d9a8a5dad67b1d16bb6b90ac0fcf15b5.

w: 警告: 来自注释处理程序 'org.jetbrains.kotlin.kapt3.base.ProcessorWrapper' 的受支持 source 版本 'RELEASE_7' 低于 -source '1.8' :sdk:kaptReleaseKotlin (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 3.773 secs.

FAILURE: Build failed with an exception.


大致看了下,apk打包后,多了一个res/navigation的目录,tinker在执行tinkerProcessReleaseResourceId任务(TinkerResourceIdTask.groovy)的时候,应该是验证了这个目录不合法,需要tinker做下适配额
xingstarx commented 6 years ago

需要开发者适配下,处理navigation目录

xingstarx commented 6 years ago

用最新的dev分支的代码测试了下,发现不需要处理navigation目录