I am following this question: How to get rss feeds android? And I'm using the code from Mathias Lin.
Notice that in the top, it says:
import org.developerworks.android.FeedParser;
import org.developerwork开发者_如何学编程s.android.FeedParserFactory;
import org.developerworks.android.Message;
import org.developerworks.android.ParserType;
import org.xmlpull.v1.XmlSerializer;
I managed to find out how to import an external .jar file (the xmlpull one). Now we have the 4 remaining lines, from org.developerworks.android. I managed to find these 4 files online here: https://www.assembla.com/code/churchmobile/subversion/nodes/FeedParser/trunk/src/org/developerworks/android?rev=25 (I don't know if this is the correct way of doing it).
Now I need my Eclipse project to import these external .java files - how do I do this? Now I have red lines underneath these 4 lines because Eclipse can't find them, obviously.
If you right click on the project in the Navigation window in Eclipse there is an 'Import' option. From there it will open a wizard style series of windows that lets you choose what to import and where to import it from. You can also import at different levels of the project (e.g. in the src folder or into a specific package you have created).
精彩评论