Android requires .class compatibility set to 5.0.

by Sylvain » Fri, 23 Apr 2010 08:02:05 GMT


Sponsored Links
 I had to reload XP and Eclipse + android of course. I am using the
2.0.1 SDK version/ API 6.

Everything was fine before, Now the project doesn't load-
I get:

[2010-04-21 09:59:24 - LatLonQ] Android requires .class compatibility
set to 5.0. Please fix project properties.

Don't see anything in project properties. Where is this set? Never saw
this before.

A clue? when I try to open the "default.properties" from my project I
get:
org.eclipse.core.internal.resources.ResourceException: Resource is out
of sync with the file system: '/LatLonQ/default.properties'.

Help!


--



Android requires .class compatibility set to 5.0.

by ravindra singhai » Fri, 23 Apr 2010 13:27:09 GMT


 Hi,

If you are using Eclipse SDK than perform following steps to fix your
problem:

Right click on your application name (within Package Explorer view) ->
Android Tools -> Fix Project Properties

It worked for me when i faced similar problem. give it a try.

/Ravi





>


Sponsored Links


Other Threads

1. GPS code works in HTC machines but fails in MOTO's



Excellent advice!

(though, a nit: in your first bullet, perhaps you mean onCreate() for
the activity, since there is no onCreate() for View)

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training in US: 14-18 June 2010: http://bignerdranch.com

-- 

2. GPS code works in HTC machines but fails in MOTO's

My code to obtain GPS coordinate works perfect in HTC cells. But I
find it doesn't work in Moto Droid. I debug it and find eveything
seems fine. But the coordinate never obtained. Please read my code
first:

/////////// defining listener
        LocationListener locationListener = new LocationListener() {

                @Override
                public void onStatusChanged(String provider, int status, Bundle
extras) {
                }

                @Override
                public void onProviderEnabled(String provider) {}

                @Override
                public void onProviderDisabled(String provider) {}

                @Override
                public void onLocationChanged(Location location) {
                        stateGPS = PR.Types.SERVICE_ACTION_STATE_UPDATED;
                        currentPosition.latitude = location.getLatitude();
                        currentPosition.longitude = location.getLongitude();

                        locationManager.removeUpdates(locationListener);
                }
        };

.....
//////////updating location information
boolean gpsEnabled = false;
                if 
(locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER))
{
                        new Handler(getMainLooper()).post(new Runnable() {

                                public void run() {
        
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,
0, 0, locationListener);
                                }
                        });

                        gpsEnabled = true;
                }

                if
(locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER))
{
                        new Handler(getMainLooper()).post(new Runnable() {

                                public void run() {
        
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,
0, 0, locationListener);
                                }
                        });

                        gpsEnabled = true;
                }
.....
//////////////fetching coordinate
Location l = null;
                                if
(locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
                                        l =
locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
                                }

                                if (l == null &&
locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) {
                                        l =
locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
                                }

                                locationManager.removeUpdates(locationListener);

                                if (l == null) {
                                        //gps unknown
                                        stateGPS = 
PR.Types.SERVICE_ACTION_STATE_OTHER;
                                        return;
                                } else {
                                        currentPosition.latitude = 
l.getLatitude();
                                        currentPosition.longitude = 
l.getLongitude();
                                        stateGPS = 
PR.Types.SERVICE_ACTION_STATE_UPDATED;
                                }
....

No error message, No fatal return. Every things invoked well, but
onLocationChanged() never be run, getLastKnownLocation() always return
null ----- No GPS information get at all. I check all the settings.
GPS device is opened and every thing is OK. The same code works in my
HTC magic, G2.

Please help me. Thank you!

-- 

3. Case Mate Google Nexus One Toug

4. Question on modifying application framework + importing to the Windows SDK

5. Intent action for network events in android sdk

6. gut morning

7. MapView, can't focus, unfocus, refocus an overlayitem