Create New Activity adds an activity which extends Activity class instead of ActionBarActivity class in Eclipse

眉间皱痕 提交于 2019-12-25 07:48:29

问题


I am a newbie to android and I was following the tutorial on android.developer.com,Where a new Activity creation adds an activity which extends ActionBarActivity by default,but When i create a new Activity it extends Activity class by default

I have also tried to set the Min API to 4.1 Jelly Bean and target to 4.4 as ActionBarActivity is available in later API but it didn't work,I have downloaded the Adt bundle from the site


回答1:


When you create new project in eclipse, you should select min required SDK below 14 to extend from ActionBarActivity. Check this: android adt bundle automatically extending ActionBarActivity and adding fragments and more stuff?



来源:https://stackoverflow.com/questions/22578807/create-new-activity-adds-an-activity-which-extends-activity-class-instead-of-act

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!