我正在使用 android 支持包 v4 中的 ViewPager,但它说它无法在支持包中找到 ViewPager 类。而且我不知道如何解决它?
LOGCAT
04-13 16:48:05.842: E/AndroidRuntime(1211): FATAL EXCEPTION: main
04-13 16:48:05.842: E/AndroidRuntime(1211): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.alpha.liveshitplus/com.alpha.liveshitplus.Discography}: android.view.InflateException: Binary XML file line #6: Error inflating class android.support.v4.view.ViewPager
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1955)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.app.ActivityThread.access$600(ActivityThread.java:122)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.os.Handler.dispatchMessage(Handler.java:99)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.os.Looper.loop(Looper.java:137)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.app.ActivityThread.main(ActivityThread.java:4340)
04-13 16:48:05.842: E/AndroidRuntime(1211): at java.lang.reflect.Method.invokeNative(Native Method)
04-13 16:48:05.842: E/AndroidRuntime(1211): at java.lang.reflect.Method.invoke(Method.java:511)
04-13 16:48:05.842: E/AndroidRuntime(1211): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-13 16:48:05.842: E/AndroidRuntime(1211): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-13 16:48:05.842: E/AndroidRuntime(1211): at dalvik.system.NativeStart.main(Native Method)
04-13 16:48:05.842: E/AndroidRuntime(1211): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class android.support.v4.view.ViewPager
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
04-13 16:48:05.842: E/AndroidRuntime(1211): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.app.Activity.setContentView(Activity.java:1835)
04-13 16:48:05.842: E/AndroidRuntime(1211): at com.alpha.liveshitplus.Discography.onCreate(Discography.java:17)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.app.Activity.performCreate(Activity.java:4465)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1919)
04-13 16:48:05.842: E/AndroidRuntime(1211): ... 11 more
04-13 16:48:05.842: E/AndroidRuntime(1211): Caused by: java.lang.ClassNotFoundException: android.support.v4.view.ViewPager
04-13 16:48:05.842: E/AndroidRuntime(1211): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
04-13 16:48:05.842: E/AndroidRuntime(1211): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
04-13 16:48:05.842: E/AndroidRuntime(1211): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.view.LayoutInflater.createView(LayoutInflater.java:552)
04-13 16:48:05.842: E/AndroidRuntime(1211): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
04-13 16:48:05.842: E/AndroidRuntime(1211): ... 21 more