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

Android 目标无法执行 assembleRelease #2697

Closed
MrXiaoM opened this issue Jun 15, 2023 · 0 comments · Fixed by #2699
Closed

Android 目标无法执行 assembleRelease #2697

MrXiaoM opened this issue Jun 15, 2023 · 0 comments · Fixed by #2699

Comments

@MrXiaoM
Copy link
Contributor

MrXiaoM commented Jun 15, 2023

问题描述

https://github.com/MrXiaoM/Aoki/actions
一个月之前 5 月 6 号因为改成了 2.15.0-dev-83 编译失败,我退回了版本。
现在 2.15.0-dev-98 是同样的问题,有时间大概分析之后发现我无法解决,来发 issue。

加参数 --info 可知,compileKotlinRelease 的时候会使用 mirai-core-release,compileKotlinDebug 的时候会使用 mirai-core-debug。

通过对比
https://repo.mirai.mamoe.net/snapshots/net/mamoe/mirai-core-androidRelease/2.15.0-dev-98/mirai-core-androidRelease-2.15.0-dev-98.aar

https://repo.mirai.mamoe.net/snapshots/net/mamoe/mirai-core-androidDebug/2.15.0-dev-98/mirai-core-androidDebug-2.15.0-dev-98.aar
的大小,

很明显可以看出来 debug 的包更大,release 就跟什么都没有一样,导致 assembleRelease 的时候找不到类,通不过编译。

复现

测试项目:https://github.com/MrXiaoM/foo

  1. 同步项目,在 IDE 中可以正常编程,mirai 相关类均能找到。
  2. 执行 assembleRelease,所有 mirai 相关的类均为找不到符号。
  3. 执行 assembleDebug,可成功编译。

mirai-core 版本

2.15.0-dev-98

补充信息

2.15.0-M1 没有这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant