【发布时间】:2016-09-24 05:07:34
【问题描述】:
我知道我可以使用快捷键 Ctrl+Alt+O 来删除 Android Studio 中不必要的导入。
现在我的资源文件里有很多字符串资源名,比如strings.xml,但是有些字符串资源名在我的项目中使用得比较神经。
有没有一种简单的方法可以删除这些未使用的字符串资源名称。
目前我必须手动删除项目<string name="ExpiredWarning">Warning</string>,如果我发现我不再需要它。
Strings.xml
<resources>
<string name="app_name">Screen Recorder</string>
<string name="BtnBuy">Purchase</string>
<string name="BtnRetrieve">Retrieve</string>
<string name="BuyPrompt">This is a trial version. It will be fully functional for 15 days. You can upgrade to the unlimited version and remove banner ads via an in-app purchase.</string>
<string name="RetrievePrompt">If you have purchased the app, please click \'Retrieve\' button to recover.</string>
<string name="MsgBillError">Problem setting up in-app billing: </string>
<string name="MsgBillINI">An error occurred when initialize billing!</string>
<string name="MsgOrderError">Purchasing error: </string>
<string name="MsgOrderOK">You have purchased successfully! Please close and restart the app !</string>
<string name="MsgInventoryFail">Failed to query inventory: </string>
<string name="MsgRetrieveOK">You have retrieved your order info successfully! Please close and restart the app !</string>
<string name="MsgRetrieveFail">You havn\'t purchased the app, please click \'Purchase\' button</string>
<string name="ExpiredWarning">Warning</string>
<string name="ExpiredTitle">The app expired, you can upgrade to the unlimited version and remove banner ads via an in-app purchase.</string>
</resources>
【问题讨论】:
-
谢谢!但我需要的是删除资源文件中未使用的项目