Andriod: The method getDrawable(int) from the type Resources is deprecated,一系列问题
2017-11-25 11:08
429 查看
如下android代码:
Drawable statusQuestionDrawable = resources.getDrawable(R.drawable.status_question); statusView.setBackgroundDrawable(statusQuestionDrawable);
结果提示:
The method setBackgroundDrawable(Drawable) from the type View is deprecated
【解决过程】
1.很明显是该函数被废弃了。
但是换成啥,目前不知道。
2、鼠标放在此函数上,弹出的提示窗口,点击替换栏。
3、鼠标再次放在此函数上,就可以看到关于此函数的替代方案,以及相关解释。
相关文章推荐
- The method showDialog(int) from the type Activity is deprecated-android旧版dialog不能用的问题
- The method dismissDialog(int) from the type Activity is deprecated
- The method setBackgroundDrawable(Drawable) from the type View is deprecated
- SSH出错---The method getRealPath(String) from the type ServletRequest is deprecated request.getRealPath("")
- 获取显示窗口警告 android The method getWidth() from the type Display is deprecated
- setBackgroundDrawable提示:The method setBackgroundDrawable(Drawable) from the type View is deprecated
- The method getValue(String) from the type HttpSession is deprecated
- 关于The method getResources() is undefined for the type XX的问题处理
- The method setBackgroundDrawable(Drawable) from the type View is deprecated
- Android中使用setBackgroundDrawable错误提示:The method setBackgroundDrawable(Drawable) from the type View is
- 问题“The method getDispatcherType() is undefined for the type HttpServletRequest”
- 日常问题记录--访问JSP文件时The method getDispatcherType() is undefined for the type HttpServletRequest
- 开发中碰到的问题:The method getSystemService(String) is undefined for the type CourseFragment
- The method getResources() is undefined for the type
- 部署Tomcat8遇到的 “The method getDispatcherType() is undefined for the type HttpServletRequest” 问题
- The method saveErrors(HttpServletRequest,ActionErrors)from the type Action is deprecated
- The method getResources() is undefined for the type
- Description Resource Path Location Type Access restriction: The method getCallerClass(int) from
- The method buildSessionFactory() from the type Configuration is deprecated
- "The method width(int) is undefined for the type SmoothProgressDrawable.Builder"