Why does eclipse automatically add appcompat v7 library support whenever I create a new project?
2015-04-14 15:55
881 查看
Best ways to solve these:
Firstly in project,
Delete fragment_main.xml and Appcompat file created in your Eclipse.
Edit and change your activity_main.xml like these:
In res/values/styles.xml:
In res/values-v11/styles.xml you have to change like these:
In res/values-v14/styles.xml you have to change like these:
Change your menu/main.xml like these:
Finally change your MainActivity.java like these:
LikeWise you have to do it for creating a new project
Firstly in project,
Right click->properties->Android.There you can see the
red marked appcompatplaced in
Reference. Click that and Remove it.Then Tick the right target name in
Project 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
相关文章推荐
- Android -- uses-sdk:minSdkVersion 10 cannot be smaller than version L declared in library com.android.support:appcompat-v7:21.0.0-rc1
- eclipse中导入v7包 android-support-v7-appcompat 和 android-support-v7-recyclerview
- eclipse导入android-support-v7-appcompat报错问题
- Eclipse导入support-v7-AppCompat问题解决办法
- Android support library appcompat v7: cannot find actionModeShareDrawable resource
- Error:(26, 13) Failed to resolve: com.android.support:appcompat-v7:25.0.1
- Failed to resolve : com.android.support:appcompat-v7:24.2.0
- 引用android-support-v7-appcompat库文件出错的问题
- 关于Eclipse 自动产生appcompat_v7
- 解决Android Studio打开别人包时出现Failed to find: com.android.support:appcompat-v7:21.
- com.android.support:appcompat-v7:21.+.
- androidstudio 问题 Failed to resolve: com.android.support:appcompat-v7:27.+
- 在Eclipse添加Android兼容包( v4、v7 appcompat )
- android studio :com.android.support:appcompat-v7:21.+ 报错
- eclipse 创建工程 appcompat_v7 报错
- Error:Failed to find: com.android.support:appcompat-v7:14.+
- Android Studio 报错 Error:Execution failed for task ':app:dexDebug'。support-v7 Theme.AppCompat.Light
- Error:Failed to resolve: com.android.support:appcompat-v7:25.+d
- android-support-v7-appcompat\res\values-v14\styles_base.xml:24:错误
- android-support-v7-appcompat的配置使用