This article is translated from Androd official technical document "Switch Statement Conversion", the original address: Http://tools.android.com/tips/non-constant-fields.
This article address: http://blog.csdn.net/maosidiaoxian/article/details/41574853. Reprint please indicate the source. Please correct me if there is any inappropriateness in the translation.
Switch Statement Conversionsposted in Sep, 2:35 PM Tor Norbye
Since ADT 14, the resource constants of the Library project are no longer final. This is explained in more detail in this document. However, one of the consequences of this is that some existing old projects will no longer compile after using ADT 14. The reasons may be more difficult to understand. There is a new quickfix detector to solve this problem, it can look for a specific compilation error, and in the presence of such errors, add a "quickfix" hint. This means that when your mouse hovers over the error, it will provide more help: If you choose this quickfix you will see this dialog box: If you choose this option, you will see the following dialog box: (note-The URL has been changed-now it's http://tool??s.android.com/tips/non-constant-fields.) ) Hopefully this will make this problem more apparent and reduce the painful changes to the code that relies on constants in the library project resources. |
Android official technical document translation--switch statement conversion