private String getMD5Str(String str) {  
        MessageDigest messageDigest = null;  
  
        try {  
            messageDigest = MessageDigest.getInstance("MD5");  
  
            messageDigest.reset();  
  
            messageDigest.update(str.getBytes("UTF-8"));  
        } catch (NoSuchAlgorithmException e) {  
            System.out.println("NoSuchAlgorithmException caught!");  
            System.exit(-1);  
        } catch (UnsupportedEncodingException e) {  
            e.printStackTrace();  
        }  
  
        byte[] byteArray = messageDigest.digest();  
  
        StringBuffer md5StrBuff = new StringBuffer();  
  
        for (int i = 0; i < byteArray.length; i++) {              
            if (Integer.toHexString(0xFF & byteArray[i]).length() == 1)  
                md5StrBuff.append("0").append(Integer.toHexString(0xFF & byteArray[i]));  
            else  
                md5StrBuff.append(Integer.toHexString(0xFF & byteArray[i]));  
        }  
  
        return md5StrBuff.toString();  
    }  

解决方案 »

  1.   

    装个xcode5,如果要真机调试,最好买个开发者证书。否则,请尝试用越狱的机器,对xcode配置自定义的证书。ps:可别考虑在Windows里装个mac,无论是硬盘安装还是虚拟机安装,目前我能确认的就是ios里的原生开发(如用object-c)开发,编译是正常的,能发布到越狱过的手机上,若是其他框架性的跨平台开发,在这里的编译都很难成功的
      

  2.   

    windows上装个object-c进行开发行吗?
      

  3.   

    不是,xcode是只能装在mac系统里的。