android-The method findViewById(int) is undefined for the type ContactMainFragment报错
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState); mTitleNameView = (TextView) findViewById(R.id.ivTitleName);
mTitleNameView.setVisibility(View.VISIBLE);
mTitleNameView.setText(R.string.company_name);
提示:意思应该是提示找不到相应组件而得不到组件ID
解决方法:加上view.即可
mTitleNameView = (TextView) view.findViewById(R.id.ivTitleName);
android-The method findViewById(int) is undefined for the type ContactMainFragment报错的更多相关文章
- Android NDK 【错误】The method loadLibrary(String) is undefined for the type Settings.Syste
[错误]The method loadLibrary(String) is undefined for the type Settings.System [解决方法] 不要加入包import andr ...
- The method replace(int, Fragment, String) in the type FragmentTransaction is not applicable for the arguments (int, SettingFragment, String)
The method replace(int, Fragment, String) in the type FragmentTransaction is not applicable for the ...
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory 这是由于项目里面的一些 ...
- The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder is not applicable for the arguments
The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder i ...
- The method getJspApplicationContext(ServletContext) is undefined for the type
type Exception report message Unable to compile class for JSP: description The server encountered an ...
- 报错:An error occurred at line: 22 in the generated java file The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 22 in ...
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的解决方法
An error occurred at line: [31] in the generated java file: [/data/tmisnt/work/Catalina/localhost/_/ ...
- The method setCharacterEncoding(String) is undefined for the type HttpServletResponse
今天将以前做的一个web项目从不笔记本上移到台式机上,import项目后出现“The method setCharacterEncoding(String) is undefined for the ...
- The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder i
参考资料: http://blog.csdn.net/competerh_programing/article/details/7377950 在创建Dialog的时候,出现: The method ...
随机推荐
- 《Continuous Delivery》 Notes 1: The problem of delivering software
What is "Deployment pipeline"? A deployment pipeline is an automated implementation of you ...
- knockout源码分析之订阅
一.主类关系图 二.类职责 2.1.observable(普通监控对象类) observable(他其是一个function)的内部实现:1.首先声明一个名为observable的fn(这个可以说是一 ...
- Bootstrap源码分析之transition、affix
一.Transition(过滤) 作为一个基础支持的组件,被其他组件多次引用.实现根据浏览器支持transition的能力,然后绑定动画的结束事件:首先:创建一个Element:然后:迭代查看此元素支 ...
- MySQL之浅谈MySQL的存储引擎
什么是MySql数据库 通常意义上,数据库也就是数据的集合,具体到计算机上数据库可以是存储器上一些文件的集合或者一些内存数据的集合. 我们通常说的MySql数据库,sql server数据库等 ...
- 模拟position:fixed效果
大家都知道fixed定位相对于浏览器窗口,下面就介绍一种不用fixed也能实现其效果的定位方法,就那点css代码,这里就直接呼上来: <!DOCTYPE html> <html> ...
- console命令详解
Firebug是网页开发的利器,能够极大地提升工作效率. 但是,它不太容易上手.我曾经翻译过一篇<Firebug入门指南>,介绍了一些基本用法.今天,继续介绍它的高级用法. ======= ...
- iOS使用Charles(青花瓷)抓包并篡改返回数据图文详解
写本文的契机主要是前段时间有次用青花瓷抓包有一步忘了,在网上查了半天也没找到写的完整的教程,于是待问题解决后抽时间截了图,自己写一遍封存在博客园中以便以后随时查阅. charles又名青花瓷,在iOS ...
- 教新手一步步解决:Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to和更新gradle问题
android studio出现问题:Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_O ...
- 操作系统开发系列—11.ELF格式 ●
ELF文件的结构如下图所示: ELF文件由4部分组成,分别是ELF头(ELF header).程序头表(Program header table).节(Sections)和节头表(Section he ...
- android遥控器的映射
第一编写kl文件时先在盒子上输入getevent -v查看设备信息,设备信息里有vendor.product.version, 假如分别是xxxx,yyyy,zzzz,那么你的文件名就要命名为Vend ...