10 Tips for Solving Problems in Android Development

10 Tips for Solving Problems in Android Development

[51CTO.com original article] There are three common pitfalls in the Android development process: development tool selection, technical documentation, and list page loading

[[184546]]

Android Development

Development tool selection

1. Regarding the pitfalls encountered during development and the choice of IDE, I suggest that you use an IDE that you are good at. Many times, when faced with an IDE that everyone says is good, you blindly follow the trend and end up wasting a lot of time on IDEs. (Beijing-Yangyang-Android)

2. Compare Eclipse and Android Studio, HTML and native, MVC, MVP, and MVVM. Compare the cost and performance of technology selection. It is difficult for newcomers to judge the tools that suit you and that you are good at at the beginning. Many people have tried every IDE before finally settling on one. IDE is ultimately a tool to improve development efficiency and facilitate code maintenance. If a tool can achieve what you need for your current development capabilities, that is enough. There is no need to pursue perfection. There are powerful and complex functions, but they are rarely used. It is unnecessary to spend a lot of time learning how to configure them. (Guangzhou-Yida-Big Data)

3. AS is indeed more convenient, HTML and native should be based on the business needs of your company. (Chongqing-zee-Terminal)

4. Android development code standards are very important, especially readability and scalability. APP is a frequently updated product. If this is not considered in the early development, the cost of later maintenance and upgrades will be much greater than the development cost, and even become a one-time thing. I personally spend more time using text editors than IDEs. I stick to one, and after using it for a long time, I slowly remember the shortcut keys. (Guangzhou-Diqin dQ-PHP)

5. Even an expert can write elegant code with Notepad, but a novice may not be able to write well even with the most powerful tools. Focus on the basics, do what you are good at, and outsource the rest. The common combination is Sublime Text + Vim (Chengdu-Enwei-Cloud Computing)

6. I have used Eclipse and Android Studio for development, but the most difficult part about switching between the two tools is the shortcut keys. Now I basically use AS, and only rarely need to use Eclipse, but the shortcut keys are really annoying to use. (Chongqing-Xiaobao-Android)

Update documents, especially do a good job of demand analysis

7. At the beginning of the project, try to write as many documents as possible. Class documents, protocol interfaces, interface managers, requirement documents, and requirement managers. (Developed by Shenzhen-sky-c++)

8. It is difficult to handle without documents, especially when the code is messy. After writing a lot of code, I noticed that there is a problem with the logic here. Although there are documents and design drawings, they are all the oldest versions, and the subsequent changes may be different from the old version of the document. But there is no update mark on where the difference is. In the end, the only way to see the functions that the business wants to achieve is through the code. Therefore, it is important to update the document in real time and record every change. (Chengdu-Ha Han Langzi-JAVA)

9. Android development requires good documentation, especially demand analysis. Guide customers to understand what system they need. You can let customers understand their needs by designing prototypes. Do a good job of early system planning and grasp the development process. Continuously iterate, communicate with customers, and complete the system. Execute according to the plan and follow the process. Otherwise, you will die miserably, and I know it. (Hefei-Fei Ge-Java)

List page loading

10. Let me tell you a pitfall in Android development, the loading of the list page. When I started using Image-Loader, a large number of image cards were really slow. First, the WeakRefence weak reference did not work well, and OOM occurred from time to time. So I compared several frameworks repeatedly and re-determined the Glide library. The effect was much better, but OOM still occurred. After debugging the entire loading process, I found that the original image was originally large, and the time spent on transmission and Decoder accounted for the largest proportion. So to solve the problem of data source, cloud storage was used for image storage. At that time, Qiniu was chosen between Qiniu and Alibaba Cloud. And the image processing function was handed over to the cloud service. In the end, the OOM of the page was reduced to below 0.01%. At the same time, the OOM in the application was also reduced to below 0.3%. This is a way to fill the pit of OOM.

Another example is that in an Android project two years ago, UDP was used to upload logs. Sometimes the logs could be uploaded successfully, but sometimes they could not. I was puzzled and refreshed the logic three times. In the process of repeatedly creating test data, I found that if the amount of data in the upload cycle is greater than a certain value, this phenomenon will occur. For the UDP data packet limit problem, a loop judgment was added, and the problem was solved. (Beijing - Cao Hongwei - a half-baked full-stack craftsman)

Welcome to join the 51CTO developer QQ exchange group 370892523 for learning.

[51CTO original article, please indicate the original author and source as 51CTO.com when reprinting on partner sites]

<<:  Understanding Code Obfuscation in Android

>>:  Android-6 steps to teach you how to customize View

Recommend

Huawei beats South Korean companies in patent lawsuits in the US

Written in front: When it comes to treating users...

The most comprehensive guide to campus promotion activities!

Today I will share with you the most comprehensiv...

GDC 2015: The secrets of Chinese mobile game social operations

Recently, KTplay, as China's largest mobile g...

Inspired by lizards, scientists design earthquake-resistant buildings →

In the face of the power of nature, humans always...

Yunfu SEO Training: What are the ranking techniques for SEO promotion keywords?

In the current SEO summary of many websites, many...

100 days, 1000 meters, a new starting point

Today marks the 13th month that Tianwen-1 has bee...