关于android4.0的launcher2源码修改,编译运行的错误,求指导把源码导入eclipse中,编译通过,运行会出现没有b
关于android4.0的launcher2源码修改,编译运行的错误,求指导
把源码导入eclipse中,编译通过,运行会出现没有bind_widget权限,然后往往很多博客说用adb命令将apk放到系统app文件夹下,然后没有缺少权限的异常了,又重新说没有Resources.getDrawableForDens方法,但是这个方法明明存在,不知道该怎么解决了,求大神指导
public Drawable getFullResIcon(Resources resources, int iconId) {
Drawable d;
try {
d = resources.getDrawableForDensity(iconId, mIconDpi);
} catch (Resources.NotFoundException e) {
d = null;
}
return (d != null) ? d : getFullResDefaultActivityIcon();
}你的android测试机运行版本是多少的?这个函数是Added in API level 15;
http://developer.android.com/reference/android/content/res/Resources.html#getDrawableForDensity%28int,%20int%29
