Android Development Learning process "the first line of code" Coolweather Project Setonitemclicklistener function, SQL statement modification to simulate app program impact

Source: Internet
Author: User

Today, will be "the first line of code," the final Combat Coolweather project, carefully done it again.

Tonight, in the first phase of the book to develop code in the end of the Android studio, found that the Setonitemclicklistener function according to the book error, the original book as follows:

However, error, Gradel hint that the class does not exist, it is unclear whether because the author version is too old reason, to be verified, later, I used the following method, compiled through, as follows:

In fact, I just called the Adapterview inside the Onitemclicklistener method.

In addition, I found a problem, that is, I gradel through the data line connected to the Android phone, debugging, the software can be installed normally, the first page, the national list of provinces can also be displayed normally, but in my click on a province, the normal should appear in the province of the city list, but then, the system crashes, App Flashback, see the error message, shown as follows:

Here, I realized that there is a problem with the SQL statement, sure enough, in the establishment of the city table, province_id error written province_code, I changed!!!

The problem came, changed, re-Gradel, restart the app, still can't solve the problem, or the same error, let me spend one hours, re-check is not where the error, also online check, strackoverflow answer all tell me, is the SQL statement is wrong, Then I tried to completely delete the original version of the app, then install, run, success.

Android Development Learning process "the first line of code" Coolweather Project Setonitemclicklistener function, SQL statement modification to simulate app program impact

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.