After the SDK update, in Eclipse new Android project, we often encounter such a thing: The new mainactivity no longer inherit activity but inherit actionbaractivity, due to some people's development habits, They do not like to use actionbaractivity but are accustomed to using activity.
Now let's talk about why you suddenly inherit actionbaractivity. Because the Actionbar in activity is only compatible with more than 3.0 versions, if you want to use it in a previous version, you should import the open source project--actionbarsherlock. And actionbaractivity This can solve this problem, can be compatible with the previous version of 3.0.
Solution:
A) When you create a new Android project, select the minimum version, select more than 4.0:
b) However, the minimum version of the project created is above 4.0, which is not what we want, but we just need to change the minimum compatible version to Androidmanifest.xml:
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
[Android] New project inheritance activity does not inherit actionbaractivity