FragmentManager 无法在 androidx 中解析
FragmentManager can't resolve in androidx
FragmentManager 和 beginTransaction 无法在 androidx
中解析
FragmentManager fM = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fM.beginTransaction();
在 androidx.appcompat.app.AppCompatActivity
or androidx.fragment.app.Fragment
中只需使用导入:
import androidx.fragment.app.FragmentManager;
class 位于 androidx.fragment:fragment:x.x.x
库中,它是 androidx.appcompat:appcompat
的依赖项。
只需使用:
implementation 'androidx.appcompat:appcompat:1.1.0'
FragmentManager 和 beginTransaction 无法在 androidx
中解析 FragmentManager fM = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fM.beginTransaction();
在 androidx.appcompat.app.AppCompatActivity
or androidx.fragment.app.Fragment
中只需使用导入:
import androidx.fragment.app.FragmentManager;
class 位于 androidx.fragment:fragment:x.x.x
库中,它是 androidx.appcompat:appcompat
的依赖项。
只需使用:
implementation 'androidx.appcompat:appcompat:1.1.0'