質問編集履歴

5

反映もれを修正

2020/03/18 05:52

投稿

carpbream
carpbream

スコア32

test CHANGED
File without changes
test CHANGED
@@ -120,19 +120,17 @@
120
120
 
121
121
  repositories {
122
122
 
123
+ google()
124
+
123
125
  jcenter()
124
126
 
125
- google()
126
-
127
- maven { url 'https://maven.google.com' } //追加
128
-
129
127
  }
130
128
 
131
129
  dependencies {
132
130
 
133
- classpath 'com.android.tools.build:gradle:3.4.2' //バージョンを3.1.3->3.6.1に修正
131
+ classpath 'com.android.tools.build:gradle:3.6.1' //バージョンを3.1.3->3.6.1に修正
134
-
132
+
135
- classpath 'com.google.gms:google-services:4.3.0' //バージョンを4.0.2->4.3.3に修正
133
+ classpath 'com.google.gms:google-services:4.3.3' //バージョンを4.0.2->4.3.3に修正
136
134
 
137
135
  ...
138
136
 
@@ -142,92 +140,74 @@
142
140
 
143
141
  ...
144
142
 
143
+ ```
144
+
145
+
146
+
145
- // allprojects自体を追加
147
+ #### アプリレベル build.gradle
148
+
146
-
149
+ ```
150
+
147
- allprojects {
151
+ android {
152
+
148
-
153
+ compileSdkVersion 28
154
+
155
+ buildToolsVersion '28.0.3' //27.0.3→28.0.3に変更
156
+
157
+
158
+
149
- repositories {
159
+ defaultConfig {
160
+
150
-
161
+ applicationId "jp.co.xxx.xxx.xxx.xxxx"
162
+
151
- jcenter()
163
+ minSdkVersion 16 //14→16に変更
152
-
153
- google()
164
+
154
-
155
- maven { url 'https://maven.google.com' }
165
+ targetSdkVersion 28 //26→28に変更
156
-
166
+
157
- mavenCentral()
167
+ versionCode 28
168
+
158
-
169
+ versionName "x.x.x"
170
+
159
- }
171
+ }
172
+
173
+ ...
174
+
175
+ productFlavors {
176
+
177
+ xxxxx {
178
+
179
+ minSdkVersion 16//14→16に変更
180
+
181
+ targetSdkVersion 28 //26→28に変更
182
+
183
+ }
184
+
185
+ }
186
+
187
+
188
+
189
+ ...
190
+
191
+ dependencies {
192
+
193
+ ...
194
+
195
+ implementation 'com.android.support:appcompat-v7:28.0.0'
196
+
197
+ implementation 'com.android.support:support-v4:28.0.0'
198
+
199
+ implementation 'com.android.support:recyclerview-v7:28.0.0'
200
+
201
+ implementation 'com.android.support:design:28.0.0'
202
+
203
+ implementation 'com.google.firebase:firebase-messaging:19.0.1' //17.4.0→19.0.1に変更
204
+
205
+ implementation 'com.google.firebase:firebase-core:17.0.1' //16.0.7→17.0.1に変更
206
+
207
+ ...
160
208
 
161
209
  }
162
210
 
163
- ```
164
-
165
-
166
-
167
- #### アプリレベル build.gradle
168
-
169
- ```
170
-
171
- android {
172
-
173
- compileSdkVersion 28
174
-
175
- buildToolsVersion '28.0.3' //27.0.3→28.0.3に変更
176
-
177
-
178
-
179
- defaultConfig {
180
-
181
- applicationId "jp.co.xxx.xxx.xxx.xxxx"
182
-
183
- minSdkVersion 16 //14→16に変更
184
-
185
- targetSdkVersion 28 //26→28に変更
186
-
187
- versionCode 28
188
-
189
- versionName "x.x.x"
190
-
191
- }
192
-
193
- ...
194
-
195
- productFlavors {
196
-
197
- xxxxx {
198
-
199
- minSdkVersion 16//14→16に変更
200
-
201
- targetSdkVersion 28 //26→28に変更
202
-
203
- }
204
-
205
- }
206
-
207
-
208
-
209
- ...
210
-
211
- dependencies {
212
-
213
- ...
214
-
215
- implementation 'com.android.support:appcompat-v7:28.0.0'
216
-
217
- implementation 'com.android.support:support-v4:28.0.0'
218
-
219
- implementation 'com.android.support:recyclerview-v7:28.0.0'
220
-
221
- implementation 'com.android.support:design:28.0.0'
222
-
223
- implementation 'com.google.firebase:firebase-messaging:19.0.1' //17.4.0→19.0.1に変更
224
-
225
- implementation 'com.google.firebase:firebase-core:17.0.1' //16.0.7→17.0.1に変更
226
-
227
- ...
228
-
229
- }
230
-
231
211
 
232
212
 
233
213
  ```

4

クオート内に入ってしまっていた文言を平文にしました。

2020/03/18 05:52

投稿

carpbream
carpbream

スコア32

test CHANGED
File without changes
test CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.6.1/gradle-3.6.1.pom'
8
8
 
9
+
10
+
9
11
  とあるのですが、ブラウザでこのURLにアクセスするとgradle-3.6.1.pomがちゃんとダウンロードされました。
10
12
 
11
13
 

3

ご指摘いただいた内容を反映しました。エラー内容を修正した内容でビルドし発生したエラーに差し替えました。エラーで表示されるURLにブラウザからはアクセスできる旨を追記しました。

2020/03/18 05:48

投稿

carpbream
carpbream

スコア32

test CHANGED
File without changes
test CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Firebaseを利用している古いプロジェクト(最初のコミットが2015年11月、最終更新が2019年5月)をAndroid Studio3.6.1でビルドしましたが、エラーが出てビルドができません。
4
4
 
5
+ また、エラー内容で
6
+
7
+ > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.6.1/gradle-3.6.1.pom'
8
+
9
+ とあるのですが、ブラウザでこのURLにアクセスするとgradle-3.6.1.pomがちゃんとダウンロードされました。
10
+
5
11
 
6
12
 
7
13
  ### AndroidStudioのバージョン
@@ -20,83 +26,65 @@
20
26
 
21
27
  > Could not resolve all artifacts for configuration ':classpath'.
22
28
 
23
- > Could not resolve com.android.tools.build:gradle:3.4.2.
29
+ > Could not resolve com.android.tools.build:gradle:3.6.1.
24
30
 
25
31
  Required by:
26
32
 
27
33
  project :
28
34
 
29
- > Could not resolve com.android.tools.build:gradle:3.4.2.
35
+ > Could not resolve com.android.tools.build:gradle:3.6.1.
30
-
36
+
31
- > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom'.
37
+ > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.6.1/gradle-3.6.1.pom'.
32
-
38
+
33
- > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom'.
39
+ > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.6.1/gradle-3.6.1.pom'.
34
-
40
+
35
- > Remote host closed connection during handshake
41
+ > Remote host closed connection during handshake
36
-
42
+
37
- > Could not resolve com.android.tools.build:gradle:3.4.2.
43
+ > Could not resolve com.android.tools.build:gradle:3.6.1.
38
-
44
+
39
- > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom'.
45
+ > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.6.1/gradle-3.6.1.pom'.
40
-
46
+
41
- > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom'.
47
+ > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.6.1/gradle-3.6.1.pom'.
42
-
48
+
43
- > Remote host closed connection during handshake
49
+ > Remote host closed connection during handshake
44
-
50
+
45
- > Could not resolve com.android.tools.build:gradle:3.4.2.
51
+ > Could not resolve com.android.tools.build:gradle:3.6.1.
46
-
52
+
47
- > Could not get resource 'https://maven.google.com/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom'.
53
+ > Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.6.1/gradle-3.6.1.pom'.
48
-
54
+
49
- > Could not GET 'https://maven.google.com/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom'.
55
+ > Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.6.1/gradle-3.6.1.pom'.
50
-
56
+
51
- > Remote host closed connection during handshake
57
+ > Remote host closed connection during handshake
52
-
53
- > Could not resolve com.android.tools.build:gradle:3.4.2.
58
+
54
-
55
- > Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom'.
56
-
57
- > Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.4.2/gradle-3.4.2.pom'.
58
-
59
- > Remote host closed connection during handshake
60
-
61
- > Could not resolve com.google.gms:google-services:4.3.0.
59
+ > Could not resolve com.google.gms:google-services:4.3.3.
62
60
 
63
61
  Required by:
64
62
 
65
63
  project :
66
64
 
67
- > Could not resolve com.google.gms:google-services:4.3.0.
65
+ > Could not resolve com.google.gms:google-services:4.3.3.
68
-
66
+
69
- > Could not get resource 'https://jcenter.bintray.com/com/google/gms/google-services/4.3.0/google-services-4.3.0.pom'.
67
+ > Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom'.
70
-
68
+
71
- > Could not GET 'https://jcenter.bintray.com/com/google/gms/google-services/4.3.0/google-services-4.3.0.pom'.
69
+ > Could not GET 'https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom'.
72
-
70
+
73
- > Remote host closed connection during handshake
71
+ > Remote host closed connection during handshake
74
-
72
+
75
- > Could not resolve com.google.gms:google-services:4.3.0.
73
+ > Could not resolve com.google.gms:google-services:4.3.3.
76
-
74
+
77
- > Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.3.0/google-services-4.3.0.pom'.
75
+ > Could not get resource 'https://jcenter.bintray.com/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom'.
78
-
76
+
79
- > Could not GET 'https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.3.0/google-services-4.3.0.pom'.
77
+ > Could not GET 'https://jcenter.bintray.com/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom'.
80
-
78
+
81
- > Remote host closed connection during handshake
79
+ > Remote host closed connection during handshake
82
-
80
+
83
- > Could not resolve com.google.gms:google-services:4.3.0.
81
+ > Could not resolve com.google.gms:google-services:4.3.3.
84
-
82
+
85
- > Could not get resource 'https://maven.google.com/com/google/gms/google-services/4.3.0/google-services-4.3.0.pom'.
83
+ > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom'.
86
-
84
+
87
- > Could not GET 'https://maven.google.com/com/google/gms/google-services/4.3.0/google-services-4.3.0.pom'.
85
+ > Could not GET 'https://repo.maven.apache.org/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom'.
88
-
86
+
89
- > Remote host closed connection during handshake
87
+ > Remote host closed connection during handshake
90
-
91
- > Could not resolve com.google.gms:google-services:4.3.0.
92
-
93
- > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/gms/google-services/4.3.0/google-services-4.3.0.pom'.
94
-
95
- > Could not GET 'https://repo.maven.apache.org/maven2/com/google/gms/google-services/4.3.0/google-services-4.3.0.pom'.
96
-
97
- > Remote host closed connection during handshake
98
-
99
-
100
88
 
101
89
  ```
102
90
 
@@ -140,9 +128,9 @@
140
128
 
141
129
  dependencies {
142
130
 
143
- classpath 'com.android.tools.build:gradle:3.4.2' //バージョンを3.1.3->3.4.2に修正
131
+ classpath 'com.android.tools.build:gradle:3.4.2' //バージョンを3.1.3->3.6.1に修正
144
-
132
+
145
- classpath 'com.google.gms:google-services:4.3.0' //バージョンを4.0.2->4.3.0に修正
133
+ classpath 'com.google.gms:google-services:4.3.0' //バージョンを4.0.2->4.3.3に修正
146
134
 
147
135
  ...
148
136
 

2

わかりづらい表現を修正しました。

2020/03/18 05:46

投稿

carpbream
carpbream

スコア32

test CHANGED
File without changes
test CHANGED
@@ -104,7 +104,7 @@
104
104
 
105
105
  ### やったこと
106
106
 
107
- - google-services.jsonをダウンロードしてアプリプロジェクトのディレクトリトップに配置しました。
107
+ - google-services.jsonをダウンロードしてアプリディレクトリの中に配置しました。
108
108
 
109
109
  - 以下の通り、gradle-wrapper.propertiesとプロジェクトレベル・アプリレベルのbuild.gradleをそれぞれ修正しました。(...は省略、xxxは伏せ字です。)
110
110
 

1

プロジェクト名を伏せ字にし忘れた箇所があったので修正しました。

2020/03/18 04:01

投稿

carpbream
carpbream

スコア32

test CHANGED
File without changes
test CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  ```
18
18
 
19
- A problem occurred configuring root project 'android-sdk-integration'.
19
+ A problem occurred configuring root project 'xxxxxxx'.
20
20
 
21
21
  > Could not resolve all artifacts for configuration ':classpath'.
22
22