Error inflating class android.support.v4.view.ViewPager

后端 未结 4 1863
遇见更好的自我
遇见更好的自我 2020-11-30 15:14

I\'ve been trying to create a Pager for my application that runs on I wrote my c

相关标签:
4条回答
  • 2020-11-30 15:23

    When We use new adt JARS SHOULD put in folder called "libs"

    Then libs -->use as source folder
    and your jar > add to build path.

    http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17

    0 讨论(0)
  • 2020-11-30 15:39

    Make sure that you place your libraries in a common folder such as libs in your project.

    Right click on the jar, then select Build Path and click on Add to Build Path.

    That will add your library to your project. If everything is correct, you can see it in a generated "folder" in the project called "Referenced Libraries"

    0 讨论(0)
  • 2020-11-30 15:40

    Go to Project → Properties → Java Build Path than select Order and Export tab.

    Set android-support-v4.jar library checked and up it into top of the list. And clean and rebuild..It works for most of the cases

    0 讨论(0)
  • 2020-11-30 15:43

    I simply Replaced the code with this and it worked

        <androidx.viewpager.widget.ViewPager
            android:id="@+id/main_tabPager"
            android:layout_width="match_parent">
    
    0 讨论(0)
提交回复
热议问题