如何提供Android库而无需公开源代码

发布于 2025-01-22 17:37:53 字数 219 浏览 3 评论 0原文

有时,当您调试Android库代码时,您会看到库的实现,但是在其他库中尝试检查任何函数的实现时,您会看到所有函数的主体都包含抛出的一行代码行一个例外(某种程度上隐藏了实际实现)。 我想在商业图书馆中这样做,我尝试了 r8 ,但该实施仍然可以访问。 任何人都可以帮助我暗示吗?

注意:在发布此问题之前,我检查了Stackoverflow建议的所有链接。

提前致谢。

Sometimes when you debug an Android library code, you can see the library's implementation, but there are other libraries where when you try to check the implementation of any function, you will see that the body of all the functions contains one line of code that throws an exception (Somehow hiding the real implementation).
I want to do that in a commercial library, I tried R8 but the implementation is still accessible.
Anyone can help or give me a hint ?

Note: I checked all the links suggested by Stackoverflow before posting this question.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

是伱的 2025-01-29 17:37:53

显然,除了使用非常昂贵的库,例如 dexguard ,您无法实现这一目标。可以使用抽象隐藏您的代码,以便仅接口接口。

Apparently, there is no way to achieve that except by using very pricy libraries such as DexGuard, however, you can use abstraction to hide your code so only interfaces are exposed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文