启动和创建新项目时android studio中出错

时间:2016-04-14 10:25:35

标签: android android-studio intellij-idea

Android Studio每天都运行良好。但是当我重新安装我的工作室时,它在我创建一个新项目并开始时就开始出现错误。

错误讯息:

protected function executeFile($method, $url, $params=array(), $as_user=null) {

    $data_string = json_encode($params);
    $method = strtoupper($method);

    $ch = curl_init();

    if($method == 'GET') {
        $url  = $this->options['api_url'].$url.'?';
        $url .= $this->format_query($params);
        curl_setopt($ch, CURLOPT_URL, $url);
    } else {
        curl_setopt($ch, CURLOPT_URL, $this->options['api_url'].$url);
    }

    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    if($as_user) {
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data_string),
        'Token: '.$this->token,
        'As: '.$as_user
        ));
    } else {
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data_string),
        'Token: '.$this->token
        ));
    }

    $result_json = curl_exec($ch);
    $curl_info = curl_getinfo($ch);


    $return             = array();
    $return["result"]   = $result_json;
    $return["entete"]   = $curl_info;
    return $return;
}

1 个答案:

答案 0 :(得分:0)

首先检查SDK和JDK是否仍然正常工作,然后您需要手动使工作室同步Gradle。