I've seen questions like this, but it's not exactly what I'm looking for.
I was following the tutorial on how to build an RSS Android parser and reader from here. Along the way, some code included importing fragmentactivityand fragment. Both imports failed. Experimentation showed me that when importing the fragment, it should be imported as
import android.app.fragment;
rather than
import android.support.v4.app.fragment;
which was in the code for this RSS reader.
Trying the same thing with
import android.app.fragmentactivity;
doesn't work, when it calls for
import android.support.v4.app.fragmentactivity;
Does anyone know why it's failing to import this properly? Reading the Android Documentation doesn't seem to help. Please let me know if I need to add anything! Thanks.
You have to import the appropriate Android Support Library. Google has a thoroughly written document here: https://developer.android.com/tools/support-library/setup.html
However, the setup is kind of different depending on your IDE (Eclipse, Android Studio, etc.) From my personal experience, Android Studio is the easiest to get started with the nasty build logistics.
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