cannot resolve method add(int , new tFragment()).commit() in android studion 1.0.1

前端 未结 2 1724
慢半拍i
慢半拍i 2021-01-18 18:35

I was working with fragments in android studio 1.0.1. Just as network process are not good to be done in the main UI, i moved my code to a different class containing fragmen

2条回答
  •  滥情空心
    2021-01-18 19:27

    the compile time error is suggesting that your ForecastFragment is using the native fragment support app.Fragment, but in your activity you are using a transaction from the support library. You have to be consistent with the import. Change your ForecastFragment in order to make it use the Fragment from the support library

提交回复
热议问题