Updated SDK version, getting ClassNotFoundException: android.support.v4.view.ViewPager

后端 未结 2 1665
忘掉有多难
忘掉有多难 2020-11-30 07:46

When i was working on my Android project i found Logcat to be annoying (not keeping the scroll bar at a given point) and read that updating SDK versions adds a pause button

相关标签:
2条回答
  • 2020-11-30 08:06
    03-22 15:54:18.558: E/AndroidRuntime(11597): Caused by: java.lang.ClassNotFoundException: android.support.v4.view.ViewPager in loader dalvik.system.PathClassLoader[/data/app/kris.android-2.apk]
    

    I tried moving the JAR's around as per above link, but it did not work for me. What did work was @Vladimir's answer.
    If you check your project's .classpath (which was generated pre-SDK.r17), you'll see that it does not contain a classpathentry for android-support-v4.jar. As of SDK.r17, this appears to be a mandatory entry, so @Vladimir's answer hence is correct.

    Google tries to (inadequately) explain this.

    0 讨论(0)
  • 2020-11-30 08:11

    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 then clean and rebuild project.

    0 讨论(0)
提交回复
热议问题