<commit_before>---
categories:
  - Uncategoried
tags:
  - Android
  - 编译
  - 异常
comment: 
info: 
date: '2017-11-1'
type: post
layout: post
published: false
sha: 
slug: the-post-7178
title: 项目编译异常的一些问题汇总

---
```
allprojects {
    repositories {
//        google()
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}
```<commit_msg>update from Jekyller<commit_after>---
categories:
  - Uncategoried
tags:
  - Android
  - 编译
  - 异常
comment: 
info: 
date: '2017-11-1'
type: post
layout: post
published: true
sha: 9be775db49dfc5746fdd40db9d156521fc367998
slug: the-post-7178
title: 项目编译异常的一些问题汇总

---

编译时因为调整了构建版本,导致出现如下错误:

`Error:Failed to resolve: com.android.support:support-v4:26.1.0`

原因是在低版本gradle中没有 google()这个库存在,直接注释掉之后as没办法找到对应的support库.

解决办法如下:


```
allprojects {
    repositories {
//        google()
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}
```

在全局仓库配置中,加入 ` url "https://maven.google.com"`这个地址就可以了
{'fraction_non_alphanumeric': 0.13676907829534193, 'fraction_numerical': 0.05153617443012884, 'mean_word_length': 2.5815602836879434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1058526', 'n_tokens_mistral': 494, 'n_tokens_neox': 500, 'n_words': 72}