Android Studio Can't resolve fragmentActivity and ViewPager imports

后端 未结 5 1683
野性不改
野性不改 2021-01-13 10:11

I follow the tutorial of developing swipe-able tabs. When I import:

import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;         


        
5条回答
  •  盖世英雄少女心
    2021-01-13 10:20

    1. Click on File, then select Project Structure
    2. Choose Modules "app"
    3. Click "Dependencies" tab
    4. Click on the + sign, choose Library Dependencies
    5. Select support-v4 or other libraries as needed
    6. OK

提交回复
热议问题