Eclipse在创建新项目/活动时的行为有所不同 [英] Eclipse behaving differently while creating new project/activity
本文介绍了Eclipse在创建新项目/活动时的行为有所不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
每当我创建新项目时,它总是与我的新项目一起创建appcompat_v7项目。当我创建新的android活动时,它始终会扩展ActionBarActivity并还会创建fragment_main.xml。我尝试更新adt和s\w仍然没有运气
Whenever I create new project it always creating appcompat_v7 project with my new project. And when I create new android activity it always extend ActionBarActivity and also create fragment_main.xml. I tried to update adt and s\w also still no luck
并且此代码也在主要活动中生成
and this code also generated in main activity
public static class PlaceholderFragment extends Fragment {
public PlaceholderFragment() {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_main, container,
false);
return rootView;
}
}
推荐答案
I有同样的问题。我想出了3种希望对您有帮助的方法
I had the same problem. I have figured out 3 ways hope this helps
- (这可能会或可能不会工作)检查您的android虚拟设备管理器。我认为您有一台为 armeabi-v7a选择了CPU / ABI的设备。删除该设备,然后尝试创建一个新项目。您会注意到不再创建项目appcompat_v7。
- (工作)避免这种情况的另一种方法是通过android项目通过现有代码创建新项目。希望您有一个之前创建的项目可以复制。
- (工作)创建一个没有活动的空白android项目,然后再创建活动。
这篇关于Eclipse在创建新项目/活动时的行为有所不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文