• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Error with AccelerometerPlay Sample of the SDK

lugopaco

Newbie
Mar 31, 2011
30
0
Mexico
Hi. I'm some kind of new at the Java language and to the ANDROID. I was checking the samples that comes with the SDK and that of the accelerometer caught particulary my attention, but once I tried to run it to see what it does, appeared that I've got 2 errors:

-The method onAccuracyChanged(Sensor, int) of type AccelerometerPlayActivity.SimulationView must override a superclass method AccelerometerPlayActivity.java /AccelerometerPlay/src/com/example/android/accelerometerplay line 457 Java Problem

-The method onSensorChanged(SensorEvent) of type AccelerometerPlayActivity.SimulationView must override a superclass method AccelerometerPlayActivity.java /AccelerometerPlay/src/com/example/android/accelerometerplay line 378 Java Problem

And 1 warning:

-Attribute minSdkVersion (5) is lower than the project target API level (10) AndroidManifest.xml /AccelerometerPlay line 1 Android ADT Problem

I will really apreciate any kind of help!!!!!!!
 
-The method onAccuracyChanged(Sensor, int) of type AccelerometerPlayActivity.SimulationView must override a superclass method AccelerometerPlayActivity.java /AccelerometerPlay/src/com/example/android/accelerometerplay line 457 Java Problem
Add @Override above the method

-The method onSensorChanged(SensorEvent) of type AccelerometerPlayActivity.SimulationView must override a superclass method AccelerometerPlayActivity.java /AccelerometerPlay/src/com/example/android/accelerometerplay line 378 Java Problem
Add @Override above the method

-Attribute minSdkVersion (5) is lower than the project target API level (10) AndroidManifest.xml /AccelerometerPlay line 1 Android ADT Problem
Your API (android version) is honycomb(10)
In your manifest you've enterd donut (5)
You can edit this in your manifest.xml
 
  • Like
Reactions: lugopaco
Upvote 0
Hi Lugopaco,
very simple to fix: do the opposite of what pietjuhhh1990 wrote! :eek:

1) Delete the @Override lines (377 and 456) before the method onAccuracyChanged(Sensor, int) and onSensorChanged(SensorEvent).

2) Ignore the warning! "Attribute minSdkVersion (5) is lower than the project target API level (10)" is not a problem it's absolutely correct! :D

Hope this helps...
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones