游戏邦在:
杂志专栏:
gamerboom.com订阅到鲜果订阅到抓虾google reader订阅到有道订阅到QQ邮箱订阅到帮看

论述Android开发新手常犯的10大错误

发布时间:2012-02-18 10:59:39 Tags:,,,

作者:Lauren Darcey & Shane Conder

作为过去10年广泛涉猎各热门平台的经验丰富手机应用开发商,我们觉得Android平台对新手开发者来说是最通俗易懂的平台。平价的工具、友好的开发社区、及众所周知的编程语言(Java),可以说开发Android应用不是难事。但尽管如此,我们依然发现有些错误反复出现在刚涉足Android平台的新手开发者身上,下面是他们常犯的10大严重错误。

1. 未阅读Android文件

Android Developer Website能够给予你很大帮助。很多文件资料不仅能够通过SDK工具下载,还能够在线呈现(游戏邦注:在线模式的文件资料会持续更新)。文件资料不仅只是Javadoc API的参考文献,它还包含众多指南、教程、视频、培训及其他有助于制作Android应用的资料。

Android Training是最新出现的辅导项目,其将有用的教程组织成课堂和课程教学内容,帮你解决特定问题或执行某些功能。

android games from androidappreviews.net

android games from androidappreviews.net

2. 未熟悉把握Android工具

Android SDK不仅只是供你编辑应用,让其顺利运作于Android平台的内容库;它还具备12个以上的工具,旨在辅助你创建应用。有些工具能够协助你设计应用的图像和图版。有些则是命令行工具,让你能够轻松访问模拟器和设备硬件。此外还有这里还有其他许多协助运作调试和描述的工具。

你可以在Android SDK文件资料中找到更多有关各种Android工具的信息。

3. 未寻求Android社区的援助

Android社区的规模很大,而且非常友好。若你对Android SDK文件资料存有疑问,自己无法解答,我们建议你先从StackOverflow.com着手,那里有针对Android开发的关键字。除此之外的其他由于资料还有谷歌邮件列表及包含指导内容的网站,例如Android Development Center。

4. 因Android应用采用Java语言而偷懒

尽管Java是包含虚拟计算机的高级编程语言(此虚拟计算机旨在将开发过程变得尽量直截了当),但这并不意味着你可以将自己变成懒惰的编码员。标准编程指南依然适用。相比传统计算机,很多Android设备的处理能力和本地存储空间都非常有限,所以低效或错误编程行为会给整体运作及用户体验带来更大影响。

5. 认为手机开发项目可以通过小成本投入完成

小屏幕!=小项目。很多手机平台的开发新手都持有错误观念:觉得手机开发项目能够由1位在校生利用一个周末完成。但实际情况是,很多成功的手机项目和传统软件开发项目一样,都需要有功能说明、进度安排、漏洞追踪、专门的工程师、专门的设计师、QA测试员和发行及维护计划。

6. 将原型作为Android应用的基础

我们常常会看到这样的应用:基本就是融入系列附着于随机位置的示例代码的空洞空间。代码丝毫未涉及深刻构思或设计原理,而且还缺少项目文件图版。最终的用户体验看起来就像是事后添加的内容。

开发者首先要花时间学习和试验Android平台,然后和团队成员探讨自己真正想要制作的内容,接着在从头开始做起。最终,你将得以剩下大把时间,避免出现令人沮丧的情况,得到高质量的代码,方便未来进行维护。

7. 整合操作系统的方式不恰当

Android平台向开发者提供众多功能,方便他们将自己的应用同操作系统或其他应用紧密结合起来。开发者应充分利用主屏幕小工具、内容供应商及意图处理等功能。确保应用能够处理的内容类型有出现共享菜单上。运用这些平台功能能够让你的应用从普通手机体验中脱颖而出。此外,若访问方便,用户会更频繁地查看及体验应用。

8. 错误定义应用配置的具体内容

Android Manifest文件是应用配置信息的聚集位置,但这些信息常常出错(游戏邦注:即便是已经发行的应用)。很多开发者无法准确说明他们所支持设备的优点。

Android Manifest文件存在的另一常见错误是,文件融入不必要的许可权限。这些错误会导致应用以不当方式入驻Android Market,从而在用户中获得较低评级。

9. 在Android平台开发iPhone应用

你我都有遇到。你将一款很棒的应用下载至自己的全新Android设备上,但其外观和运作方式却是iOS应用的模式。太令人失望了。Android平台有自己的外观和操作方式,这是用户所期待的内容——这也是他们首先选择购买Android设备的原因所在。这些相似的应用常常缺乏小工具、内容供应商及其他Android特色功能,这些都使得内容缺乏协调性。

10. 发行后未维护应用

你是否发现,有些应用从未进行更新,而其他内容却频繁更新?要想稳固自己的位置,开发者就得关注应用更新。Android平台依然以稳定步伐持续发展。开发者要留心Android Market的通讯渠道,这通常会呈现开发者需要进行的必要改变。若没有融入更新内容,有些应用就会落后他人。开发者要确保自己应用不会变成其中之一。

Android开发新手注意事项

避免犯错的最佳方式就是把握进行此操作的后果。把握上述10大错误能够让开发者及其团队避免陷入类似误区。(本文为游戏邦/gamerboom.com编译,拒绝任何不保留版权的转载,如需转载请联系:游戏邦

The 10 Rookie Mistakes Every Android Developer Should Avoid

By Lauren Darcey & Shane Conder

As veteran mobile application developers with experience in most of the popular platforms of the past decade, we feel that the Android platform is one of the most accessible platforms for new developers. With cheap tools, a friendly development community, and a well-known programming language (Java), developing Android apps has never been easier. That said, we still see a number of mistakes that developers who are new to Android make over and over again. Here are the 10 most insidious gaffes.

1. Not Reading the Android Documentation

The Android Developer Website is there to help you. Much of the documentation can be downloaded with the SDK tools and is also available online (our preferred format as it’s continually updated). The documentation is far more than just a Javadoc API reference. It includes many guides, tutorials, videos, training, and other helpful material for creating Android applications.

Android Training is the latest of these, organizing helpful tutorials into classes and lessons to guide you through solving particular problems or implementing particular features.

2. Failing to Familiarize Yourself with the Android Tools

The Android SDK is more than just a library you use to compile your application so it runs on Android phones; it has over a dozen tools to help you build apps. Some of these tools help you design the graphics and layouts of your applications. Others are command line tools, which provide easy and scriptable access to emulators and device hardware. Still others help with performance tuning and profiling.

Find more information about many of the Android tools in the Android SDK documentation.

3. Not Asking for Help from the Android Community

The Android community is large and friendly. When you have questions that the Android SDK documentation (see #1) can’t answer, we recommend you start at StackOverflow.com, which has a tag specific to Android development. Other helpful resources include Google mailing lists and sites with tutorials, such as you’ll find on the Android Development Center.

4. Being Lazy Because Android Apps Are Written in Java

Java may be a high-level programming language with a virtual machine that attempts to make development as straightforward as possible, but that doesn’t mean you can be a lazy coder. Standard programming guidelines still apply. Most Android devices have limited processing power and local storage capacity compared with traditional computers, so inefficient or incorrect programming practices have a much larger impact on overall performance and user experience.

5. Assuming Mobile Development Projects Can Be Done on a Shoestring

Small screen != small project. Many developers new to mobile (and, unfortunately, their bosses) are under the mistaken impression that all mobile development projects can be completed over a weekend by a single caffeinated college student. (Yeah, we’ve heard those stories, too.) However, the truth is that most successful projects require functional specifications, schedules, bug tracking, dedicated engineers, dedicated designers, QA testers, and a release and maintenance plan just like traditional software development projects.

6. Using a Prototype as the Foundation for an Android App

Too many times we’ve seen an app that was basically a hello world with a bunch of sample code glued on in random places. No forethought or design is used in the code, and the project file layout is also missing. The final user experience seems to be an afterthought.

Take the time to learn and experiment with the Android platform first. Then, sit back with your team and think about what you really want to build and start from scratch. Ultimately, you’ll save time and frustration and have production quality code with easier future maintenance.

7. Poor Integration with the Operating System

The Android platform provides many features for developers to integrate their app tightly with the system and other apps. Take advantage of home screen widgets, content providers, intent handling, and other such features. Make sure any content types your application can handle appear on the share menu. Using these platform features differentiates your app from the generic mobile experience. Additionally, users will see and engage with your app far more frequently if it’s easier to access.

8. Improperly Defining Application Configuration Details

The Android Manifest file is the central location for application configuration, but this information is frequently incorrect even on published applications. Many developers don’t correctly specify the device traits they support.

Another common mistake in the Android Manifest file is to register for unnecessary permissions. These mistakes can cause the application to be published incorrectly on the Android Market, resulting in low ratings from users, amongst other things.

9. Developing an iPhone App for Android

You’ve seen it. We’ve seen it. You download a cool app to your shiny new Android device, but it tries to look and behave exactly like a typical iOS app. Whoa there! Not cool. The Android platform has its own look and behavior, which users expect — that is why they bought Android devices in the first place. These same apps are frequently missing widgets, content providers, and other unique features of Android (see #7), which makes them seem even more out of place.

10. Not Maintaining Apps After Publication

Have you ever noticed how many apps don’t ever get updated, while others are updated constantly? In order for apps to stay relevant, developers must stay on top of application updates. The Android platform is still maturing at a steady pace. Pay attention to the Android Market communications, which often highlight required changes that developers need to make. Without updates, some apps may be left behind. Make sure your app isn’t one of them.

Android Newbies Beware

The best way to avoid making a mistake is to be aware of the danger of doing so in the first place. Here we’ve listed 10 of the most common mistakes we see from new Android developers. Simply being aware of them will help inoculate you and your team from becoming victims of these insidious pitfalls.(Source:developer


上一篇:

下一篇: