0

I am following a tutorial to create a basic app in AS, currently I am receiving an incompatible type error and am a bit tangled at how to tackle this i have placed a picture of the offending file below;

enter image description here

The tutorial I have been following is from RJs Android Tutorials

I'm sorry if this is really obvious or has been answered before but I have trawled for a while and could not see an answer to this problem.

Thanks for your help

W

Wing69
  • 1
  • Help us help you - please paste the relevant part of the code here (we call that a [mcve]) as text, and not as an image. – Mureinik Sep 21 '18 at 22:29
  • Welcome! You'll have much better luck if you include your code or what you've done so far in order for others to try and help. – lloan Sep 21 '18 at 22:33

1 Answers1

0

It may be because in MainPagerAdapter you use support.v4.app.Fragment but your create() methods return android.app.Fragment type

Ivan
  • 61
  • 5
  • should i return something different? or use a different version ? Thanks for the quick reply btw – Wing69 Sep 21 '18 at 22:59
  • @Wing69 you should use fragments from one package. Only support fragments or only usual fragments. Show this https://stackoverflow.com/questions/15109017/difference-between-android-app-fragment-and-android-support-v4-app-fragment – Ivan Sep 21 '18 at 23:06
  • Thanks alot guys really appreciate the help – Wing69 Sep 22 '18 at 01:10