The "forced closure" approach to the development of the four--android platform of the first programmer's thinking "cultivation"

Source: Internet
Author: User

My friends and I participate in a competition-the Internet of things application skills competition, the skills required by this competition, hardware technology, Android platform Development Technology,. NET platform development technology, so this is a team game, basically no one can master these three kinds of technology (students).

One of today's tasks is: Serial communication experiments. For Android platform development, requires the Android project deployed to the test machine, and then open the serial port for the COM1,COM2,COM3 and corresponding baud rate of the serial port.

The problem we encountered was that after the Android project was deployed, a "forced shutdown" message box pops up.

Here's my understanding of "forced shutdown":

Android Program, popup "Force close" message box location:

1. After the start of the program, complete the window before initialization;

2. After clicking the button

Android program, pop-up "force off" message box to solve the idea:

1. First, consider whether your own code is problematic.

Ways to find the wrong code location:

1). Commissioning method.

By setting breakpoints

2). Code exclusion method.

The first type: By setting multiple message boxes. After which message box appears the "Force Close" message box, then the code after this is the wrong location of the code.

The second type: by commenting the code. First, all the input code is commented out, and then followed by the code execution sequence to unpack the comments, run until the error code location is found.

2. Then consider whether the SDK version is different from the simulator, test machine or the real-computer SDK version

The simulator version is low, the use of the SDK version is high, which will lead to some of the simulation machine control and control properties are incompatible;

The simulator version is high, the use of the SDK version is low, the same problem will occur;

Perhaps I am not very comprehensive, but if we can solve the problem, it is better;

Welcome everyone to comment, point out my shortcomings, if there is a better way, also write out, we learn together.

    

The "forced closure" approach to the development of the four--android platform of the first programmer's thinking "cultivation"

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.