Android requires .class compatibility set to 5.0. Please fix project properties. Problem

Today I’ve downloaded a sample android application from web. Everything was right but the following error was shown while building the project:

“Android requires .class compatibility set to 5.0. Please fix project properties.”

Then I found “target=android-5” in the default.properties and <uses-sdk android:minSdkVersion=”5″ /> in the manifest file. So, nothing seemed to be wrong. But the application could not be run in AVD. After trying for some times, I got the code working! And I thought I should write it here for those facing the same problem:

  1. Right click on the project -> Android Tools -> Fix Project Properties.
  2. Restart Eclipse
  3. Then Build the Project again.

This trick will work as it worked for me! Happy Coding!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s