问题描述
我是Android的新手,我正在关注,其中一个新的活动创建添加了默认扩展ActionBarActivity的活动,但是当i
创建一个新的Activity时,默认情况下扩展Activity类
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 icreate a new Activity it extends Activity class by default
我还尝试将Min API设置为4.1 Jelly Bean,并将目标定为4.4,因为ActionBarActivity在稍后的API中可用,但没有起作用,我已经从站点下载了Adt软件包
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
推荐答案
当您在eclipse中创建新项目时,应从ActionBarActivity中选择最低要求的SDK 14以下。
检查:
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?
这篇关于创建新活动添加了一个活动,它在Eclipse中扩展了Activity类而不是ActionBarActivity类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!