缺少android.support.v4.jar builder path 导入 v4.jar包 Error inflating class android.support.v4.view.ViewPager
04-10 18:57:54.656: E/AndroidRuntime(6346): FATAL EXCEPTION: main
04-10 18:57:54.656: E/AndroidRuntime(6346): java.lang.RuntimeException: Unable to start activity ComponentInfo{cn.learn.tabhosttest/cn.learn.tabhosttest.ViewPagerActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class android.support.v4.view.ViewPager
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2358)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2410)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.app.ActivityThread.access$600(ActivityThread.java:168)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1376)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.os.Handler.dispatchMessage(Handler.java:107)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.os.Looper.loop(Looper.java:194)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.app.ActivityThread.main(ActivityThread.java:5398)
04-10 18:57:54.656: E/AndroidRuntime(6346): at java.lang.reflect.Method.invokeNative(Native Method)
04-10 18:57:54.656: E/AndroidRuntime(6346): at java.lang.reflect.Method.invoke(Method.java:525)
04-10 18:57:54.656: E/AndroidRuntime(6346): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:836)
04-10 18:57:54.656: E/AndroidRuntime(6346): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:603)
04-10 18:57:54.656: E/AndroidRuntime(6346): at dalvik.system.NativeStart.main(Native Method)
04-10 18:57:54.656: E/AndroidRuntime(6346): Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class android.support.v4.view.ViewPager
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:698)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
04-10 18:57:54.656: E/AndroidRuntime(6346): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:277)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.app.Activity.setContentView(Activity.java:1892)
04-10 18:57:54.656: E/AndroidRuntime(6346): at cn.learn.tabhosttest.ViewPagerActivity.onCreate(ViewPagerActivity.java:50)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.app.Activity.performCreate(Activity.java:5168)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1150)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2322)
04-10 18:57:54.656: E/AndroidRuntime(6346): ... 11 more
04-10 18:57:54.656: E/AndroidRuntime(6346): Caused by: java.lang.ClassNotFoundException: Didn‘t find class "android.support.v4.view.ViewPager" on path: DexPathList[[zip file "/data/app/cn.learn.tabhosttest-1.apk"],nativeLibraryDirectories=[/data/app-lib/cn.learn.tabhosttest-1, /vendor/lib, /system/lib]]
04-10 18:57:54.656: E/AndroidRuntime(6346): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
04-10 18:57:54.656: E/AndroidRuntime(6346): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
04-10 18:57:54.656: E/AndroidRuntime(6346): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.view.LayoutInflater.createView(LayoutInflater.java:552)
04-10 18:57:54.656: E/AndroidRuntime(6346): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
04-10 18:57:54.656: E/AndroidRuntime(6346): ... 22 more
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。