Reputation: 5531
For some reason the samples that Google gives out with the SDK always have errors. In this case I cannot seem to figure out what is causing them. Im trying to create a new project from existing source and importing the wifidirect example (android-sdk/samples/15/wifidirect). Now, I keep getitng problems with the new classes. In the example its trying to override a new view.OnClickListeners onCreate method, but its saying it needs to override a superclass method and that I should removed the override notation. Im also getting this with a few other classes as well. The whole project seems to be bugged. Anyone else having this problem or have been able to figure out what the problem is?
Upvotes: 3
Views: 1865
Reputation: 139
You may need to install API's of the correct version.
Open the SDK manager and install the needed API versions which are missing.
Reopen the development environment, Eclipse, and update Android development if needed.
Then clean the project and if needed rebuild the sample project.
After updating these, the errors should go away.
There could still be errors in the code.
Upvotes: 0
Reputation: 2393
Select Your Project,Press ALT+Enter
OR Right Click
and Select Properties
in the Properties window select Java Compiler
Tab and Enable The Java Specification
Where You Can Change The Java Versions And Change to 1.6
if it is 1.6
then change it to 1.5
and press ok and again change to 1.6
it will ok
Upvotes: 1
Reputation: 15089
I've tried and the project WifiDirect
has no problem. Please set your Java Environment to 1.6, not 1.5
Upvotes: 1