Issue
I am cleaning and rebuilding some of my project, and some phrases gets deleted from values.xml
. Is there a way to detect these phrases which are deleted and get some kind of error in code before building.
Because currently I simply get crash in certain areas of app there phrases are missing and are being accessed by old code.
For example phrase partsone
is not found in values
anymore.
But code
Title.setText(context.getString(R.string.partsone));
looks good in eclipse and builds. Only crashes at runtime...
Solution
You may want to use lint. It has a check for missing strings and several other analyse tools on board.
http://tools.android.com/tips/lint
More informations how to use Lint with Eclipse can be found at http://developer.android.com/tools/debugging/improving-w-lint.html
Take care:
you will need the eclipse ADT Plugin installed to get lint working (for free) with eclipse. You can get the ADT Plugin at http://developer.android.com/tools/sdk/eclipse-adt.html
After it is installed you can see the lint dialog at
Window > Show View > Other > Android > Lint Warnings.
Answered By - Emanuel
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.