把源码导入eclipse中,编译通过,运行会出现没有bind_widget权限,然后往往很多博客说用adb命令将apk放到系统app文件夹下,然后没有缺少权限的异常了,又重新说没有Resources.getDrawableForDens方法,但是这个方法明明存在,不知道该怎么解决了,求大神指导

解决方案 »

  1.   

    getDrawableForDens这个方法你自己加的吗?自己加的你就得编译那个模块,并push进去
      

  2.   

    不是啊,是android.jar包中本来就有的,如图:
      

  3.   

    编译通过说明能找到这个方法的引用,可以贴出Log?
      

  4.   


    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
      

  5.   


    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

    嗯  谢谢你  问题解决了,确实是版本的问题