检查你在 Android Studio 中有多少方法

编程入门 行业动态 更新时间:2024-10-27 21:12:08
本文介绍了检查你在 Android Studio 中有多少方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

看起来我对 65K 的 dex 限制很感兴趣,如果我写一些新的方法我有一个 dex 错误,如果我删除一些旧的东西,它就消失了.

有没有办法检查您目前在 Android Studio 中使用了多少方法?

解决方案

Android Studio 提供了一种内置方式来执行此操作.切换到项目"视图,导航到/app/build/outputs/apk/flavor/type apk 的路径.双击 APK.这将在编辑器中启动 apk,您可以在其中在窗口的上半部分看到各种库及其相关大小.在这个窗口中向下滚动,直到找到 classes.dex(或者如果你有多个,classes2.dex 等).单击此按钮,您将在窗口底部看到按包的方法引用.如果您使用多种风格或构建类型,您还可以使用此视图来分析构建的 Android Manifest.可以在

It looks like I'm flirting with the dex limit of 65K, if I write some new methods I have a dex error, if I remove some older things, it's gone.

Is there a way to check how many methods you are using at the moment in Android Studio?

解决方案

Android Studio provides a built in way to do this. Change to the 'Project' view, navigate to /app/build/outputs/apk/path to flavor/type apk. Double click on the APK. This will launch the apk in the editor where you can see the various libraries and their associated sizes in the top half of the window. Scroll down in this window until you find classes.dex (or if you have more than one, classes2.dex, etc.). Click on this and in the bottom of the window you will see method references by package. You can also use this view to analyse the constructed Android Manifest if you work with multiple flavors or build types. More info can be found on the android developer site

这篇关于检查你在 Android Studio 中有多少方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-15 00:04:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/851417.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:你在   中有   方法   Studio   Android

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!