I seem to have botched up something in Eclipse. It isn't recognizing any of the libraries that I am trying to import.
Here are some of the things not being recognized:
import java.util.ArrayList;
import android.content.Intent;
import com.google.android.maps.MapView;
This is a open source project that I downloaded and then imported into Eclipse. I think I also downloaded the google apis the wrong way because things like MapView don't work in my other projects as well. Can someone please help me out?
Best,
Aneem
EDIT:
Fixed, most of the issues. Did it by hovering mouse to import line and clicking "Fix project setup..."
Now the only thing I have to do is get the google map related API to work.
Go to Preferences » Java » Editor » Content Assist » Advanced. Make sure Other Java Proposals is ticked/checked. If that does not work simply close the project and reopen it.
Go to the line of unused import, press Ctrl + 1, which is an Eclipse shortcut of a quick fix. This will show a drop-down menu to fix this error and one of them will be “remove unused imports.” It will remove that import statement from the Java file.
As you type a class name, press Ctrl+Space to bring up Eclipse's autocomplete. Once you press Enter to select it, Eclipse will automatically add an import for the class.
To check if you have properly installed ADT goto -> Window -> Preferences. If you see Android (in the preferences), it means you have ADT installed.
To point to the valid SDK directory, click on Android. Specify the location in the SDK location.
Even if you have correctly installed ADT and SDK, there is a chance that eclipse may not recognize as the Android project if you import it(depends on the project & files). Best thing is, to create a new Android project and copy the files from the imported project to the newly created Android project. This will definitely work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With