Android的最佳实践Android

2023-09-13 00:08:49 作者:空山清雨

我想知道是否有是为Android / Java的最佳做法的任何名单。我知道有在.net中喜欢用String.Concat,而不是胡说和放大器;等等。

I was wondering if there are any lists of best practices for Android/Java. I know there are in .Net like using String.Concat instead of blah & blah.

有什么,你已经找到,其他人可能不知道?

Are there any that you have found, others might not know about?

推荐答案

对于Java,一般都有看 Checkstyle的或 PMD 的规则集。它应该给你一个什么样的作品是一个好主意,什么不。您还可以设置这些工具在你的构建或在您的IDE来警告你的事情,才成为问题。

For Java in general have a look at the checkstyle or PMD rule sets. It should give you a good idea of what works and what doesn't. You can also set these tools up in your build or in your IDE to warn you about things before they become problems.

此外,一定要看看在 Android的具体准则。