Android 开发路线图
我做了一些研究,并且对 Android 开发感兴趣。我以前从未编程过,也不知道如何从零经验过渡到为移动设备进行开发。我的兴趣是最终制作某种 2D 游戏。
是否有从头开始的教学计划?我认为首先需要学习 Java 语言。看了Sun网站,有点望而生畏。有没有一本书,特别是,可以将这些知识包含在一些有指导的课程计划中?
我不确定 2d 游戏是否需要 opengl-es。我对此做了一些研究,它甚至比 Java 本身更令人畏惧。我什至不知道从哪里开始,即使只是 opengl,sans -es。我最好的猜测是我需要进一步的 Java 知识才能继续这个工作,但即使如此,是否可以与 Java 同时学习?
I've done a little research, and am interested in developing for Android. I've never programmed before, and have no idea how to go from zero experience to developing for a mobile device. My interest is in eventually making some sort of 2d game.
Is there a lesson plan for starting from the ground up? I would think one would need to learn the Java language to start. Looking at the Sun website, it's a bit daunting. Is there a book, specifically, that would wrap up this knowledge in a bit of a directed lesson plan?
I'm not sure if opengl-es is what would be required for 2d games. I've done a little research on this, and it's even far more daunting than Java itself. I can't even begin to figure out where to start with even just opengl, sans -es. My best guess would be that I need further knowledge in Java to continue with this, but even still, is it possible to learn concurrently with Java?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
经验丰富的程序员的典型答案是,应该先从 Java 开始,然后再转向 Android 特定的代码,但我不同意。我认为对于新程序员来说最重要的是能够在对他们来说有用的环境中快速看到他们的工作成果。换句话说,您需要有某种想要完成的个人项目。这比编写教科书上的一些随机程序更有动力,并且您可以通过克服途中的特定障碍来学习。
现在我必须补充一点,我不是一个经验丰富的程序员,而且我从未尝试过教任何人编程。从这个意义上说,CommonsWare 的评论应该更有分量,因为他就这个问题写了多本书,因此拥有作为讲师的经验。然而,我是作为一个基本上从头开始自学 Android-Java 编程的人来发言的。我涉足过一些语言,如 VB(用于 Excel 宏)和 C,但我从未编写过超过一百行的代码,而且对面向对象编程一无所知。
当然,这样做会很混乱。您经常会阅读教程,并对它们为什么这样做感到困惑,或者例如,它们所说的“私有静态”整数或类继承的含义是什么。您还会以糟糕的风格进行编程,以笨拙或低效的方式解决问题。然而,我认为这些问题被个人动机的好处所抵消。如果你知道某件事为什么对你很重要,那么学习它就会容易得多。
然而,诀窍是确保您选择简单的项目来开始。您必须意识到,对任何有用的东西进行编程都会显得复杂和困难。尝试从 2D 游戏开始是行不通的;首先要学习的东西太多了。最好的起点是Android 开发人员网站上的教程。与这些一起工作,看看是否可以稍微修改它们以执行不同的操作。
之后,看看你是否能找到一些让你的手机感到恼火的简单事情(注意:我假设你实际上有一部 Android 手机),或者让生活变得更轻松的事情。就我而言,我编写了一些非常基本的程序来执行一些操作,例如按一下即可更改铃声的音量,从静音变为中等音量,反之亦然。
完成此操作后,您就可以处理更大的项目。当然,最终您将不得不认真阅读“正确的”Java 教程,因为您不能永远半盲地笨手笨脚地前进。但重申一下这一点,我认为如果你知道它为什么重要,那么学习就会容易得多。
最重要的是,要有耐心和坚持!一旦你克服了最初的困惑,就会很有趣!
The typical answer from experienced programmers is that one should start with Java before moving on to Android-specific code, but I disagree. I think the most important thing for a new programmer is to be able to see the fruits of their work quickly and in a context that feels useful to them. In other words, you need to have some sort of personal project that you're trying to complete. This gives you more motivation than working on some random program in a textbook, and you learn by overcoming the specific obstacles en-route.
Now I must add that I am not an experienced programmer, and I have never tried to teach anyone to program. In that sense, CommonsWare's comment should hold more weight as he has written multiple books on the issue and thus has experience as an instructor. However, I speak as someone who has taught himself to program in Android-Java essentially from scratch. I had dabbled in a few languages like VB (for Excel macros) and C, but I never wrote anything more than about a hundred lines of code long and didn't know anything about object oriented programming.
Of course, doing things this way will be messy. You'll often read tutorials and be confused by why they are doing things the way they are, or for example, what they mean by a "private static" integer or class inheritance. You'll also program with poor style, solving problems with a clumsy or inefficient manner. However, I think these problems are outweighed by the benefits of personal motivation. It's much easier to study something if you know why it matters to you.
The trick however is to make sure you choose easy projects to start with. You must realise that programming anything useful will appear complicated and difficult. Trying to start with a 2d game will not work; there is just too much to learn first. The best place to start is the tutorials on the Android Developer's website. Work with those and see if you can modify them a bit to do different things.
After that, see if you can find some simple things that irritate you with your phone (note: I'm assuming you actually have an Android phone), or things that would make life easier. In my case, I wrote a few very basic programs to do things like change the volume of my ringtone at one press, to go from silent to mid-volume and vice-versa.
Once you've done that, you can tackle bigger projects. Of course, eventually you're going to have to knuckle down and read the 'proper' Java tutorials as you can't bumble along half-blind forever. But to reiterate the point, I think it's much easier to learn if you know why it matters.
Above all, be patient and persevere! It's fun once you're past the initial bewilderment!
对于学习 Java,我会推荐一本类似 Big Java 或 核心 Java。只有当您熟悉该语言后,我才会建议您转向移动开发。我自己从来没有做过任何Android开发,但是最近在做一个J2ME项目,我发现书籍没有太大帮助。相反,最好只是开始学习可以在网上找到的教程,然后逐渐为自己开发小型简单的应用程序。一边学习一边一点一点地构建你的应用程序。
也许其中最令人困惑的部分是学习如何将所有语言移植到新平台并了解构建和部署。但是,如果您从小样本开始,您会很早就遇到这些障碍,同时仍然很容易弄清楚您需要知道什么,然后您可以带着具体问题回到这里,毫无疑问,会有很多问题可以提供帮助的人。
For learning Java I would recommend a book like Big Java or Core Java. Only once you are comfortable with the language would I recommend moving on to mobile development. I have never done any Android development myself, but recently worked on a J2ME project and I found that books weren't much help. Instead it was best to just start working on tutorials you can find online then gradually work your way into developing small simple apps for yourself. Build your app bit by bit learning as you go.
Probably the most confusing part of it all is learning how the langauge all ports to the new platform and getting your head around building and deployment. But if you start off with small samples you will come across these hurdles early on while it is still easy enough to work out what you need to know, and then you can come back here with specific questions and no doubt there will be a number of people who can help.