找不到android.support.v4.view.ViewPager

转自http://blog.csdn.net/nj_liuzl/article/details/8825855

在加载页面xml(setContentView(R.layout.activity_main);)的时候就报错,过不去了,程序上是activity加载不上报错,采取第三种方法。

因为support v4是新添加进来的,在java build path -->order and export把v4勾上。

时间: 2024-10-12 12:39:42

找不到android.support.v4.view.ViewPager的相关文章

android新手关于左右滑动的问题,布局把<android.support.v4.view.ViewPager/><ImageView/> 放在上面就不行了。

============问题描述============ main.xml代码: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:umadsdk="http://schemas.android.com/apk/res/com.Love

缺少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: main04-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

Could not find class &#39;android.support.v4.view.ViewPager&#39;问题处理

Could not find class 'android.support.v4.view.ViewPager', referenced from method*** 而且我有引入ViewPager包,编译是不报错的,但运行时报ViewPager不存在. 解决办法: 1.既然提示工程中没有导入jar包,那么我们就手动将其导入: 右击工程选择 Bulid Path->Add Libraries->User Library->User Libraries->new(随便取一个名字,比如

android.support.v4.view.ViewPager 如何动态更换显示内容

看一段简单的代码,在一个pager里面显示两个TextView List<View> items = new ArrayList<View>(); adapter = new MyPagerAdapter(); TextView tv = new TextView(getActivity()); tv.setText("第一页"); items.add(tv); tv = new TextView(getActivity()); tv.setText("

java.lang.NoClassDefFoundError: android.support.v4.view.ViewConfigurationCompat

Recently I am trying to run the sliding menu examples which was given in this blog: http://www.curious-creature.org/2012/12/14/android-recipe-3-sliding-menu-layers-and-filters/; 1. download library prject from github; 2. Inside the main project, righ

Robotium导入被测源码遇到问题 had used a different Landroid/support/v4/view/ViewPager

记录一下,鼓捣两天终于找到原因了,右键单击Robotium project,选择Build path->Configure Build Path..,在Libraries中删除android-support-v4.jar,问题解决. 注:即使被测源码与Robotium具有相同的jar包 -- android-support-v4.jar,Robotium也会报错.

android.support.v4.widget.DrawerLayout 抽屉效果导航菜单

抽屉效果导航菜单图示 如图所示,抽屉效果的导航菜单不用切换到另一个页面,也不用去按菜单的硬件按钮,直接在界面左上角的一个按钮点击,菜单就滑出来,而且感觉能放很多东西 概况:实现上图所示的抽屉效果的导航菜单有以下两种方式 方式1.用SlidingDrawer: http://developer.android.com/reference/android/widget/SlidingDrawer.html 但是不知道为什么这个类官方不建议再继续用了: Deprecated since API lev

Xamarin.Android提示找不到mono.Android.Support.v4

Xamarin.Android提示找不到mono.Android.Support.v4 错误信息:Error: Exception while loading assemblies: System.IO.FileNotFoundException:Could not load assembly ‘Mono.Android.Support.v4, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065’.Perhaps i

android.support.v4.app.Fragment vs android.app.Fragment 的区别

android.support.v4.app.Fragment vs android.app.Fragment 的区别 我开过平板相关应用,用了Fragment来处理.后来重新开发另外一个应用,直接引用了原来布局和代码, 我用的是android.support.v4.app.fragment居然死活通过.总是报错 “android.view.InflateException: Binary XML file line #7: Error inflating class fragment” 往下推