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:
- Right click on the project -> Android Tools -> Fix Project Properties.
- Restart Eclipse
- Then Build the Project again.
This trick will work as it worked for me! Happy Coding!