BitmapFactory.decodeResource第二个参数cannot be resolved or is not a field
public static Bitmap getSelectImage(Context context){
Bitmap bm = BitmapFactory.decodeResource(context.getResources(),
R.drawable.selected);
return bm;
}
R.drawable.selected中的selected下面有波浪线,提示selected cannot be resolved or is not a field.
1 quick fix available:Magrate Android Code.
点击Magrate Android Code.后打开对话框:
R.java里面的drawable里面也有selected。请问是什么原因的问题呢? --------------------编程问答-------------------- 里面有句提到“defined in library projects”,原因可能是因为你不是应用程序,而是选择了isLibrary,右键点击工程属性,在弹出的窗口中取消程序的isLibrary
如果不是上面的,有可能是因为你的ADT版本和SDK tools版本不对应,请都升级到最新版本 --------------------编程问答-------------------- 确实是有这两方面的问题,感谢!
补充:移动开发 , Android