Why does eclipse automatically add appcompat v7 library support whenever I create a new project?
Best ways to solve these:
-
Firstly in project,
Right click->properties->Android
.There you can see thered marked appcompat
placed inReference
. Click that and Remove it.Then Tick the right target name inProject Build Target
. -
Delete fragment_main.xml and Appcompat file created in your Eclipse.
-
Edit and change your activity_main.xml like these:
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" /> </RelativeLayout>
-
In res/values/styles.xml:
<resources> <style name="AppBaseTheme" parent="android:Theme.Light"> </style> <!-- Application theme. --> <style name="AppTheme" parent="AppBaseTheme"> </style> </resources>
-
In res/values-v11/styles.xml you have to change like these:
<resources> <style name="AppBaseTheme" parent="android:Theme.Holo.Light"> </style> </resources>
-
In res/values-v14/styles.xml you have to change like these:
<resources> <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar"> </style> <style name="AppTheme" parent="AppBaseTheme"> </style> </resources>
-
Change your menu/main.xml like these:
<menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/action_settings" android:orderInCategory="100" android:showAsAction="never" android:title="@string/action_settings"/> </menu>
-
Finally change your MainActivity.java like these:
import android.app.Activity; import android.os.Bundle; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
LikeWise you have to do it for creating a new project
齊帥
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 现代计算机视觉入门之:什么是图片特征编码
· .NET 9 new features-C#13新的锁类型和语义
· Linux系统下SQL Server数据库镜像配置全流程详解
· 现代计算机视觉入门之:什么是视频
· 你所不知道的 C/C++ 宏知识
· 不到万不得已,千万不要去外包
· C# WebAPI 插件热插拔(持续更新中)
· 会议真的有必要吗?我们产品开发9年了,但从来没开过会
· 【译】我们最喜欢的2024年的 Visual Studio 新功能
· 如何打造一个高并发系统?