Current location - Education and Training Encyclopedia - Education and training - How to teach yourself Android programming?
How to teach yourself Android programming?
How to teach yourself Android programming;

The project needs, and I decided to do an Android program in mid-August, so I immediately began to learn the development knowledge of Android and share my recent learning experience with you. Don't download a lot of materials and videos at the beginning, and then you don't know what to do. Set yourself a goal. What should I do? How can I achieve my goal?

I don't know java, but I know C# and C++, so I don't advocate learning java language alone. If you are a beginner and have no language foundation, you must read the java language first, and don't look closely, because when you learn Android, you are also learning java.

1. Clear objectives

Learning without goals will make me feel that I have no achievements in the future. Before 1 year, I also planned to learn android development, but the purpose was to learn. I downloaded a lot of learning videos online, and then built a development environment so that Helloworld could run, type some logs and switch activities with each other, but the future was abandoned because I didn't know what to do after learning. I made several examples based on gourd painting ladle, because the problems inside have been solved, so I haven't been able to study systematically and deeply.

This time, because of the needs of the product, I want to make an Android version, and what I want to do has been designed from the beginning. See Shake 2 1 Android version. At first, I didn't know what the technical difficulties were, but the goal I wanted to do was very clear and there was no ready-made one. I will check the information when I encounter problems and solve them slowly. This is targeted and has a good learning effect. There are ready-made technologies available, and some technologies need to look up more information, so that the memory is deeper and the knowledge mastered is more systematic.

In the next series of articles, I will tell you in detail about the problems encountered by 1 in its development. Although the program is small, it is complete, and the requirements for making Demo and products are completely different. If Daniel Andrew thinks he has little knowledge, he can take a detour. After all, I started as a complete novice.

2. Understand the difficulties in Android development.

To learn a new platform, you should know where the difficulties are in the development of this platform, and finally don't do it. If these problems are not considered, the situation will be even worse. After searching online, how to summarize the difficulties of Android development?

1) There are many versions of Android system, and the compatibility between versions is a problem, which is a system fragment.

2) Android devices are ever-changing and it is difficult to unify them. Each product has become an independent and scattered Android fragment.

3) Various resolutions. A product may need multiple interfaces for typesetting, and the labor consumption is relatively large.

Do you feel headache when you see this picture?

To sum up, the fragmentation of Android really kills developers.

3. Build a development environment

"A clever woman can't cook without rice", and developing the environment is definitely the first thing to do. There are many articles of this kind, so I won't say much. It's boring to say too much. Thanks to Wu Qin, who is also a member of Blog Garden. He writes in great detail. Look here.

4. Check some experiences summarized by netizens.

You don't have to look at everything, just look at what problems you have encountered in the development, so that the knowledge you have discovered can be practiced in depth immediately and the knowledge will be consolidated.

1) First of all, of course, it depends on the development documentation of Android, which actually contains most of the knowledge and the samples that come with the SDK.

2) Searching for "Android development" in the blog garden will bring out a lot, and many netizens have systematic explanations.

3)eoe

In the android community, many netizens uploaded ready-made demo codes, many of which were developed by imitating the interface of popular products, which was very good.

5. Master debugging methods

Personally, I always think that debugging skills are the most important skills in development. If you have poor debugging skills and don't know how to find problems, you won't be a good programmer and your skills won't be much higher.

After Android is finished, I feel that it has been debugged well, thanks to Eclipse.

The IDE is doing well, but the interface typesetting part of Android is really flattering. Eclipse takes a long time and takes up a lot of memory. Can an expert tell me what your interface typesetting is?

In Android, if something goes wrong with the program, some of them can't be tracked at once, so the Log class will be used. The use of the Log class is very simple, so I won't say much.

I had a very touching experience. If you really plan to do Android development, buy a device, which can greatly improve the development efficiency. Simulators are sometimes really troublesome to use, and the developed equipment is not very good. As long as the device resolution is mainstream, the sensor support is the best. Huawei's mobile phone is not bad, or it is not expensive to buy a second-hand one on Taobao. Really buying an investment may also increase your determination to learn Android.

6. Procedural framework

After 10 years of experience, I realized that the framework of the program really plays an important role in developing products. A good product, if it has a good program framework, will really get twice the result with half the effort. There may be a lot of work at first, and it is hard to see exciting results, but believe me, it is definitely worth it. At first, I also paid more attention to the development of program interface, and soon developed the interface, and I was really excited because something happened, but later things really made people crazy. It's too late to start again, and the time is close to the plan. Time doesn't allow, so I have to bite the bullet and make up for it, and deliver the first version, the second version or a later version sooner or later. Therefore, before leading the team for post-development and development, it is necessary to discuss the program framework, set aside a lot of time to develop the program framework, and constantly improve it during development.

I just came into contact with Android and didn't know what program framework to use, so I looked up a lot of information and saw a program framework at first, which felt very good, so I used the following program framework from the beginning.