Let's talk about the android development tool.

Source: Internet
Author: User

Let's talk about the android development tool.

I. Preface

It has been more than a year since android was developed. I think that I was still in college when I first started learning android. It was the road to android after watching the video tutorial of mars, from the initial environment establishment to the development project, I explored the progress step by step. Since I have never been led by a senior android engineer, I learned most of my blogs and eoe forums from the Internet, therefore, I deeply love technology to share this, because the power of the network is because a large number of people do not share their own technology for any benefit, so we can find the answer on the network, even if there is no answer, we can find the results of previous studies. We can step on the shoulders of our predecessors and continue to advance quickly. Newton said that he succeeded on the shoulders of giants, do we just close our doors to build a car? Ah, damn it, I haven't written a blog for a long time, and I'm pulling it apart. Back to the topic, let's talk about the android development getting started. The development tools we use.

II. I used to think that the classic development kit

1. To develop android, we need a java environment first. There is no doubt that if there is no such environment, we will go to Google's "java environment building". Google has been harmonized by tianchao recently, if it doesn't work, you can go to bing. Baidu is too scum. We suggest you stop using it. If you like to watch various training advertisements, I won't block you from going to Baidu to find du Niang ~~!

2. With the java environment, you can use the most popular ide (integrated development environment) eclipse of android. It should be the most popular now. I don't know it in the future, google should have developed a better IDE-android studio. After the event, no one in java Development knows about Eclipse. Although it is not a strong java development tool, eclipse can be used almost after downloading and decompressing, and no configuration is required for installation.

3. the adt plug-in is used for android development in Eclipse. adt integrates a set of things required for android development. The installation is also very simple. Baidu can find the answer.

So much nonsense, it seems that I have not talked about how to install it. I want to talk about ideas and find Google, because there are already a lot of resources on this network, the tools required for the basic environment setup are java + eclipse + adt. Do beginners think it is so complicated to build an environment? In fact, we don't need to do this step by step. Now we only need to go to the next java, and then go to the next adt on the android official website to integrate Eclipse, adt and SDK, and then we can start a helloworld. After running helloworld, we still know a little better about it. Otherwise, how can we improve the B-frame. Make a connection, or everyone will think that all the text looks strange.

Java download: http://www.google200.com/search? Q = java

Adt download: http://developer.android.com/

After completing these two steps, you can develop hello world. You can use the default virtual machine of the SDK In the adt to run. Of course, this virtual machine runs very slowly and we want to swear by our mother, so you can use a real machine. Of course, you can also use the fastest genymotion virtual machine developed based on the x86 architecture. Who should know.

Let's look at him.

It looks better than native

Iii. genymotion Simulator

: Http://www.genymotion.com/

Speaking of genymotion, I want to talk about its development and development. First, the architecture of this virtual machine is that all the x86 apps are running on it, at the beginning I thought there was a problem with the program, and later I learned that ARM and x86 to be compatible with a plug-in to convert it, details can study http://forum.xda-developers.com/showthread.php? T = 2528952. Simply put, it is the next Genymotion-ARM-Translation, and then restart the simulator to OK. There is also the possibility that genymotion will be installed and you will not be able to connect to the genymotion server. At this time, you only need to change the DNS to 8.8.8.8, which is better than using a real machine. I also thought that when I was doing map development, this simulator could directly point Google's map to the latitude and longitude to be passed to the simulator. At that time, I thought it was just as happy as Columbus found a new great road. For the time being, there are so many other things that I don't really want to think about.

4. fiddler

: Http://www.telerik.com/fiddler

During network development, when a network problem occurs or you want to view network data, you can only know the debugging and tcpdump at first, which is inconvenient to use, in particular, tcpdumg is a scum. At that time, it was always depressing that Shenma didn't have a simple and easy-to-use tool like chome browser F12. Later, I found that I did not find it. Ah, we can see how important it is to have guidance from our predecessors. The principle of fiddler is to set up a proxy on the computer, and then the mobile phone or simulator can use this proxy to access the Internet to see the data stream, which is very convenient. The specific configuration should be available.


There are some bad things about this packet capture. This packet capture sometimes affects requests. We noticed that we used a 7-way image server during the development process, uploading images with this packet capture will cause a program to crash due to an error in the Response Header. I also asked seven technical staff for a long time and they insisted that their servers would not return this way. Finally, after debugging for a long time, we found that the packet was caught. Tens of millions of Grass-mud horses rushed in the heart. So when using this tool, you should also note that it is not necessarily a program problem, because this packet capture tool will also cause some unknown errors.


V. New-generation development tool android studio

Soga cannot be a brand new development tool. The integrated development environment specifically developed by Google for android is based on IntelliJ IDEA-The Best Java and Polyglot IDE, the best java development environment, So Google has tried new things since android studio 0.1 was launched last year. Of course there were still many problems at that time, and now it is much better to update it to 0.8, however, since my company didn't use it, I didn't fully go to studio. Now I find that if I don't go to android studio, I will lag behind. android studio is much better than Eclipse in smart searching, the adt on Eclipse is almost unchanged, and the new tool can keep the freshness at all times. Of course, the installation of android studio in tianchao is often unsuccessful because a gradle is downloaded when the project is created for the first time, which is on the Google server and cannot be downloaded once backed by the wall, so you can manually download one and set it yourself, as shown in. If you are used to switching the default shortcut key from Eclipse, you will not be used to it. You can change the Keymap to Eclipse. Android studio does not have much time to use, so I don't know how to get started. I just think this is the development direction. Maybe everyone will move to android studio in the future, so it's okay to use it.



Vi. Summary

There are still a lot of tools in development, and we want to use these code optimization and monitoring tools like apt, mat, and lint. We have the opportunity to have an in-depth understanding of these advanced tools, and I am still in the getting-started stage, therefore, these tools are rarely used and rarely understood. There is nothing to do with them. So learn them slowly.


A question about android Development

<Activity
Android: name = "com. example. my_first.MainActivity"
Android: screenOrientation = "portrait">
</Activity>

<Activity
Android: name = "com. example. my_first.activeform1"
Android: screenOrientation = "portrait">
</Activity>
Register these two classes in the AndroidManifest. xml file and write them in <application>.

A question about android Development

The definition of a package can be divided according to the features you designed. For example, you can create a view package related to the interface and a control package related to interface control, you can create a model package based on data, or a manage package based on business logic.

In general, this can be seen as a further abstraction of modular design. You can take a look at the content of Model-Driven Architecture, and I believe it will help you establish the concept of package definition.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.