Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle 5.1.1依赖传递丢失tinker-android-loader #1074

Open
XuQK opened this issue Apr 18, 2019 · 7 comments

Comments

@XuQK
Copy link

commented Apr 18, 2019

今天刚升级AS3.4正式版,gradle也随之升级到了5.1.1,com.android.tools.build:gradle:3.4.0。然后发现tinker-android-loader依赖丢失了。

tinker版本:如:1.9.11

gradle版本:如:5.1.1

是否使用热更新SDK: Bugly SDK

系统:如:Ubuntu

堆栈/日志:
在gradle4.10.1下执行gradle dependencies,tinker部分结果如下:

+--- com.tencent.tinker:tinker-android-lib:1.9.11
|    +--- com.tencent.tinker:tinker-commons:1.9.11
|    |    +--- com.tencent.tinker:aosp-dexutils:1.9.11
|    |    +--- com.tencent.tinker:bsdiff-util:1.9.11
|    |    \--- com.tencent.tinker:tinker-ziputils:1.9.11
|    +--- com.tencent.tinker:tinker-android-loader:1.9.11
|    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0-alpha02

在gradle5.1.1下执行gradle dependencies,tinker部分结果如下:

+--- com.tencent.tinker:tinker-android-lib:1.9.11
|    \--- com.tencent.tinker:tinker-commons:1.9.11
|         +--- com.tencent.tinker:aosp-dexutils:1.9.11
|         +--- com.tencent.tinker:bsdiff-util:1.9.11
|         \--- com.tencent.tinker:tinker-ziputils:1.9.11

tinker-android-loader在5.1.1下丢失了。

@tomystang

This comment has been minimized.

Copy link
Collaborator

commented Apr 24, 2019

估计是pom的格式有问题,暂时先别用gradle 5.+,tinker暂时还没适配gradle 5.+,估计编译时还有其他坑。

@Leifzhang

This comment has been minimized.

Copy link

commented Apr 30, 2019

建议先关闭 d8 编译

@guangmomo

This comment has been minimized.

Copy link

commented May 6, 2019

在gradle4.10.1下执行gradle dependencies,tinker部分结果如下:

+--- com.tencent.tinker:tinker-android-lib:1.9.11
|    +--- com.tencent.tinker:tinker-commons:1.9.11
|    |    +--- com.tencent.tinker:aosp-dexutils:1.9.11
|    |    +--- com.tencent.tinker:bsdiff-util:1.9.11
|    |    \--- com.tencent.tinker:tinker-ziputils:1.9.11
|    +--- com.tencent.tinker:tinker-android-loader:1.9.11
|    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0-alpha02

但是拉取依赖的时候拉取不到 com.tencent.tinker:tinker-android-loader:1.9.11

@noproxy

This comment has been minimized.

Copy link
Contributor

commented May 6, 2019

这个bug是在 125e4f0#r33421318 引入的. 使用implementation依赖的库,在发布到maven时,maven pom中会把这个library标记为java-runtime而不是java-api。最终只会进入RuntimeClasspath,不会在CompileClasspath。

这是我这边DebugCompileClasspath中过滤tinker的依赖信息:

+--- com.tencent.tinker:tinker-android-anno:1.9.13
+--- com.tencent.tinker:tinker-android-lib:1.9.13
|    \--- com.tencent.tinker:tinker-commons:1.9.13
|         +--- com.tencent.tinker:aosp-dexutils:1.9.13
|         +--- com.tencent.tinker:bsdiff-util:1.9.13
|         \--- com.tencent.tinker:tinker-ziputils:1.9.13

这是DebugRuntimeClasspath的:

 :app:dependencies
+--- com.tencent.tinker:tinker-android-lib:1.9.13
|    +--- com.tencent.tinker:tinker-commons:1.9.13
|    |    +--- com.tencent.tinker:aosp-dexutils:1.9.13
|    |    +--- com.tencent.tinker:bsdiff-util:1.9.13
|    |    \--- com.tencent.tinker:tinker-ziputils:1.9.13
|    \--- com.tencent.tinker:tinker-android-loader:1.9.13
noproxy pushed a commit to noproxy/tinker that referenced this issue May 6, 2019
noproxy added a commit to noproxy/tinker that referenced this issue May 6, 2019
…endency close Tencent#1074

Signed-off-by: noproxy <toxzcp@gmail.com>
noproxy added a commit to noproxy/tinker that referenced this issue May 6, 2019
tomystang added a commit that referenced this issue May 6, 2019
fix issue #1074
@noproxy

This comment has been minimized.

Copy link
Contributor

commented May 6, 2019

This issue cannot close automatically by merge into 'dev' branch because the default branch is master.

@tomystang Consider to set the default branch to dev in Github settings.

@BryanSharp

This comment has been minimized.

Copy link

commented Jul 1, 2019

这个bug是在 125e4f0#r33421318 引入的. 使用implementation依赖的库,在发布到maven时,maven pom中会把这个library标记为java-runtime而不是java-api。最终只会进入RuntimeClasspath,不会在CompileClasspath。

这是我这边DebugCompileClasspath中过滤tinker的依赖信息:

+--- com.tencent.tinker:tinker-android-anno:1.9.13
+--- com.tencent.tinker:tinker-android-lib:1.9.13
|    \--- com.tencent.tinker:tinker-commons:1.9.13
|         +--- com.tencent.tinker:aosp-dexutils:1.9.13
|         +--- com.tencent.tinker:bsdiff-util:1.9.13
|         \--- com.tencent.tinker:tinker-ziputils:1.9.13

这是DebugRuntimeClasspath的:

 :app:dependencies
+--- com.tencent.tinker:tinker-android-lib:1.9.13
|    +--- com.tencent.tinker:tinker-commons:1.9.13
|    |    +--- com.tencent.tinker:aosp-dexutils:1.9.13
|    |    +--- com.tencent.tinker:bsdiff-util:1.9.13
|    |    \--- com.tencent.tinker:tinker-ziputils:1.9.13
|    \--- com.tencent.tinker:tinker-android-loader:1.9.13

所以应该如何解决呢?

@noproxy

This comment has been minimized.

Copy link
Contributor

commented Jul 1, 2019

@BryanSharp 更新到v1.9.13.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.