FragmentManager和beginTransaction無法在 androidx 中解析 FragmentManager fM = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fM.beginTransaction();
1 回答

慕神8447489
TA貢獻1780條經驗 獲得超1個贊
在androidx.appcompat.app.AppCompatActivity
或androidx.fragment.app.Fragment
僅使用導入:
import?androidx.fragment.app.FragmentManager;
該類位于androidx.fragment:fragment:x.x.x
庫內部,它是androidx.appcompat:appcompat
.?只需使用:
implementation?'androidx.appcompat:appcompat:1.1.0'
添加回答
舉報
0/150
提交
取消