Reputation: 133
I am working with eclipse juno and when i create new application so it contain error.
I am go through with following solution but still the error is there.
1. clean and build the application
2.Add the appcompat_v7 library
please help me to fix this error.![I have added and clean the project but still the error are there][2] [2]:
Upvotes: 1
Views: 537
Reputation: 413
Do as directed:
Delete appcompat_v7 library
library from your project. You will find some errors in your main project.
You will find errors in your styles
files in the values
folder.
(i) Apply the following lines of code in the styles.xml
of your values
folder which contains error:
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>
(ii) Apply these in styles.xml
of values-v11
folder:
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>
(iii) Apply these in styles.xml
of values-v14
folder:
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>
Inside menu
folder, replace app:showAsAction="never"
with android:showAsAction="never"
Finally in your MainActivity
replace ActionBarActivity
with Activity
. Remove all the unnecessary imports.
Now hopefully, your project is ready to run.
Upvotes: 4
Reputation: 744
That is may be because you are not added the appcompact_v7 support jar file to your project properly.Check this link How to add support libraries? will be helpfull.dont forget to restat your eclipse after adding the jar file.
1)add your support library to your project explorer. 2)add jar file inside it to your android project,as suggested in the above link. 3)clean and build your project(or restart eclipse).
Upvotes: 0