I have Eclipse Luna installed on my Mac and yesterday night I downloaded from the sdk manager the latest android sdk (v. 21 Android 5.0). Unfortunately after the update I got several errors that I tried to solve following the instructions in several posts here in Stack Overflow.
1. In java build path under Android Dependencies the jar file for Appcompact 7 was not found under the bin folder. I've read that this was due to the fact that I should have set 21 as the project target for the support library then clear and build the library project so that the jar file would be automatically created under the bin folder, but that didn't happened.
2. I added the jar file of the library under the bin folder manually. At this point instead of having the exclamation mark on the project name I have all the files under src folder marked with errors as the R file is not recognized anymore. I don't have any errors in any xml file, but still R resources are not found in the project.
3. Every time I try to change the target sdk for my project to 21 or 21 with google apis I get an error stating "Parsing Data for Google Inc.:Google APIs:21 failed Unsupported major.minor version 51.0". I've read that probably this is due to the jdk version installed on the computer so I updated it to the version 8 and changed the compiler in Eclipse to the 1.8 version. That didn't solve the problem so I got it back to 1.6.
4. In the problems tab I have the following errors:
- The import com.google.android.gms cannot be resolved;
- R cannot be resolved to a variable;
- the method initializePoolObject() of type DBObjectStructure must override a superclass method.
Do you have any idea of how to get to work again wthout any problems?
com.google.android.gms comes from the Play Services SDK, which you attach to your application project as an Android library project. Please check your environment to ensure that you have a valid copy of the Play Services library project and that your application project still points to it.
Install a new Play Services:
Follow the instruction from Google to install 'google-play-services-lib' project.
This is the documentation.
Make sure that your compiling and target versions are set to 21. Its because the new AppCompat only compiles on 21.
Right click the project and click "Properties". Then select "Android" from the tree on the left. You can then select the target target version on the right.
Note: Make sure your properties, classpath and project files are writable otherwise it won't work
You have to update your jdk version into 1.8 to overcome this error.Also change the java compiling version of your project into 1.8 in eclipse.