android - Android 中未使用的字符串和图像资源

标签 android

我的项目有大量的 String 和 ImageResources,我觉得其中很多都没有使用。有什么方法可以找出我的代码中当前没有引用哪些资源?

最佳答案

在 Android Studio(已试用至 2.1.3 版)中,您只需转到 主菜单 -> 分析 -> 按名称运行检查...,然后选择 未使用的资源

enter image description here

(它为您运行 Android Lint。)

关于android - Android 中未使用的字符串和图像资源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16211011/

相关文章:

android:popupMenuStyle 不适用于 Theme.AppCompat.Light.DarkActionBar

android - Facebook Messenger 如何绘制聊天头? (安卓)

android - 跨平台移动订阅(Android + iOS)

android - ImageView findViewById 和 setContent(R.layout.main) 不起作用

Android Google Drive API 集成无法在调试 APK 上添加帐户

java - 如何从扩展 Activity 重写方法?

android - 通过 NDK 访问 Android 传感器

java - Android + Firebase : synchronous for into an asynchronous function

android - 如何在线性布局(另一个线性布局的子布局)中均匀分布 View ?

java.lang.NumberFormatException : Invalid int: in display the image from sd card