Type Type mismatch: cannot convert from RegisterFragment to Fragment

后端 未结 2 1907
心在旅途
心在旅途 2021-01-12 00:49

Here is my Code and The problem occurs in Switch Case....plz help

package com.example.atg.adapter;

import com.example.atg.LoginFragment;
import com         


        
2条回答
  •  伪装坚强ぢ
    2021-01-12 01:16

    The problem is that your RegisterFragment is a android.app.Fragment, but you are returning a android.support.v4.app.Fragment in your getItem(...) method. Check your import statements in both classes where you are importing Fragment and make sure they are either both importing the normal android.app.Fragment or the support library android.support.v4.app.Fragment depending on your application's needs.

提交回复
热议问题