An error about the threading mechanism of Android development and the asynchronous flush interface of files that appear to be written to the store.

Source: Internet
Author: User

First say thread. The asynchronous refresh UI developed by Android needs to be carried out in the main thread, you need to write handlers to do, write a thread to send the message to handler, and then this time there will be a threaded exception, the interface is the operation you click the button once, and then click again will jump off, the program crashes. You only need to listen to the button at your time by using the direct new thread (the name of a thread outside). Start is solved.

In the wirelessly file Storage section 2, one is stored to the SD card. But the machine does not have the same problem that causes the storage not to go in. For example, I made an external storage to determine whether to load, and the machine is not external storage, but this machine has a problem, change the machine. Ning is always stored in the memory device, that is, the machine itself with the memory device. Ning Wai today gave me a newspaper open file failed: Open files:p ermisson. First check that your permissions have 3 permissions to read and write and create folders.

All network communication interfaces in Android need to be accessed through threads. Second, in the development of Android we inevitably need to set some global variables in the applition inside easy to take. We can build our own class to inherit the original class on the line. Then configure the path to the Name:+ class in the configuration file.

An error about the threading mechanism of Android development and the asynchronous flush interface of files that appear to be written to the store.

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.