So i'm having huge problem and i need to fix it as fast as possible. I did a format of my comp and installed new version of eclipse. I imported my project as well as 2 libraries it uses. Those 2 libraries are named v7/gridlayout and actionbarsherlock/library. Under android and reference it shows that i have those 2 library included. They looked compiled just fine. But when i clean my project i get an error:
The type com.google.android.maps.MapActivity cannot be resolved. It is indirectly referenced from required .class files
at line:
public class MainActivity extends SherlockMapActivity implements ActionBar.TabListener
Ok so from some reason it seams that my application now needs to be build as google api. So i do that. Now my R file doesn't get created and i get this error:
R cannot be resolved to a variable
I think that this probably means that i have some error in my layouts but where? When i check them out i find that they all have the same error:
Missing styles. Is the correct theme chosen for this layout?
Use the Theme combo box above the layout to choose a different layout, or fix the theme style references.
So i'm back to problem that there is something wrong with sherlock...
Any ideas?
btw: In .xml i use this as theme:
xmlns:android="http://schemas.android.com/apk/res/android"
I have the feeling that the problem lies here :
[2012-09-27 12:54:37 - com.motiviti.zmapp.MainActivity] C:\Users\mitja\Desktop \zmap\res\values-v11\styles.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light'.
[2012-09-27 12:54:37 - com.motiviti.zmapp.MainActivity] C:\Users\mitja\Desktop\zmap\res\values-v14\styles.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'.
There are some points you should check:
Since you change eclipse i suppose you download the lastest adt plugin. If your project has a libs folder and all your librairies are there, check on the project properties if there are references of these librairies on the java build path. If it's the case remove them since latest adt plugin does this for you (remeber your folder name must be libs). I've already had problems with this and was hard to find.
If i'm not wrong Sherlock is a project librairy that is linked to your project. This means the Sherlock project must be on your workspace and must be open so it can compile. See http://actionbarsherlock.com/usage.html
From ABS usage: Since the library is an extension of the official support library you must also have the android-support-v4.jar referenced by your project
.
Check that you are compiling with Android 4.0+ since Sherlock requieres this: Due to its use of the native action bar and its related classes on Ice Cream Sandwich, the library requires that both it and your project are compiled with Android 4.0 or newer. The project also requires that you are compiling with JDK 1.6 in both your editor and any build systems that you may be using.