Hi ,This is my first android application , by creating the package , I had a lot of build path errors. and I do not know how to solve,please help me
Asked
Active
Viewed 92 times
1
-
this is caused because you didn't add appcompat to your project , follow the instructions described [here](http://stackoverflow.com/questions/17903521/android-actionbar-how-to-add-supporting-library-v7-appcompat-for-eclipse#answer-17903778) – Muhannad Fakhouri May 11 '15 at 19:03
1 Answers
0
I'm pretty sure its the "appcompat_v7", which is automatically generated in eclipse when setting up an android project. It imports unnecessary features and causes a bunch of build errors.
- Delete "appcompat_v7" folder
- go to your MainActivity
- Delete the import "android.support.v7.app.ActionBarActivity";
- change "MainActivity extends ActionBarActivity" to "MainActivity extends Activity"
- add import android.app.Activity;
- add import android.os.Bundle;
- add import android.view.Menu;
- add import android.view.MenuItem;
- go to res folder and then go to your values folder...delete styles.xml
- delete values-v11 folder
- delete values-v14 folder
- go to menu folder, and click on main.xml...go to "item" tag and delete app:showAsAction="never"
- go to AndroidManifest.xml...go to "application" tag...delete android:theme="@style/AppTheme"
- go to project at the top...clean and build...you should have no more errors.

Andrew El-Masry
- 129
- 14
-
Thanks Andrew EL-Masry ,I followed the steps but still eclipse signal errors , this kind of errors : R cannot resolved to a variable MainActivity. thanks for helping me :) – Sylia Medjbour May 11 '15 at 21:13
-
I assume you are using eclipse...did you click project at the top, and then clean and build? – Andrew El-Masry May 12 '15 at 14:24
-
Yes Andrew , i did that , but it it doesn't solve the R error :( – Sylia Medjbour May 13 '15 at 20:43
-
are there any errors in your xml files? no errors in values folder or AndroidManifest? – Andrew El-Masry May 13 '15 at 21:20
-
Andrew , i've solve it .it is ultimately a problem of sdk , i update it and now there is no errors :) . thanks for your help Anrew – Sylia Medjbour May 15 '15 at 13:20