Exception encountered in Android development

Source: Internet
Author: User

Java.lang.RuntimeException:Unable to start Activity componentinfo{com.lam.fundamental/ Com.lam.datasave.dairy.DairyActivity}: Java.lang.RuntimeException:Your content must has a ListView whose id attribute i S ' Android. R.id.list '


Environment: thrown when starting listactivity

Reason:android:id="@+id/android:xxxlist"

Solution: Change the above to:android:id="@+id/android:list"


Android.content.ActivityNotFoundException:Unable to find explicit activity class {***************. Diaryeditactivity}; Declared this activity in your androidmanifest.xml?

Environment: Thrown when activity is started

Cause:activity is not declared in the Androidmanifest.xml file

Resolution: In Androidmanifest.xml The corresponding activity in the statement.


Java.lang.RuntimeException:Unable to start Activity componentinfo{com.lam.fundamental/ Com.lam.datasave.dairy.DairyActivity}: Java.lang.IllegalArgumentException:column ' _id ' does not exist

Environment: Thrown when using the cursor

Cause: Cursor enforcement requires "_id" as the primary key, and there are no fields named "_id" or "id" in the table of the database

Workaround: Add the field to the corresponding table in the database



The connection to ADB are down, and a severe error has occured.

[2015-07-07 17:13:33-test] You must restart ADB and Eclipse.

[2015-07-07 17:13:33-test] Please ensure this adb is correctly located at ' D:\DEV\tools\Android_SDK\sdk\platform-tools\adb.exe ' and can be executed.


Environment: When running a project

Cause: Port occupancy;

Workaround : Close the appropriate process. A lot of software with mobile phone helper functions, such as QQ, Pea pod, 360, in the development of the best when the corresponding function to close.


FATAL Exception:main

Android.view.InflateException:Binary XML file line #2: Error inflating class Com.lam.myview.ToDoList

at Android.view.LayoutInflater.createView (layoutinflater.java:596)


Environment: Thrown when using custom components;

Cause: A constructor is missing, and when you construct a custom control using a resource file, you must have a constructor that contains both the context and AttributeSet parameters

Workaround: Add a constructor to the custom control.



Activity. The softwaremanageractivity has leaked window android.widget.linearlayout{ff5f484 v.e ...... 0,0-264,87} That's originally added here

At Android.view.viewrootimpl.<init> (viewrootimpl.java:363)

At Android.view.WindowManagerGlobal.addView (windowmanagerglobal.java:261)

At Android.view.WindowManagerImpl.addView (windowmanagerimpl.java:69)

Environment: When the Popupwindow is displayed, it is thrown when the fallback key is clicked continuously.

Cause: Some controls exist that depend on other controls, as Popupwindow here, so when you click the back key continuously, the Popupwindow dependent activity is destroyed, causing the exception to be thrown.

Solution: Before the activity is destroyed, Popupwindow will be given to dismiss off.




Exception encountered in Android development

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.