質問編集履歴

1

settingGradle、app/build.gradleについてご指摘いただいた内容で更新/buildエラーメッセージ

2020/03/09 06:17

投稿

Tera2001
Tera2001

スコア6

test CHANGED
File without changes
test CHANGED
@@ -100,6 +100,8 @@
100
100
 
101
101
 
102
102
 
103
+ * Syncエラーメッセージ
104
+
103
105
  ```
104
106
 
105
107
  ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve project :module.
@@ -112,6 +114,28 @@
112
114
 
113
115
 
114
116
 
117
+ * Buildエラーメッセージ
118
+
119
+ ```
120
+
121
+ Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
122
+
123
+ > Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
124
+
125
+ > Could not resolve project :MyModule:module.
126
+
127
+ Required by:
128
+
129
+ project :app
130
+
131
+ > Unable to find a matching configuration of project :MyModule:module:
132
+
133
+ - None of the consumable configurations have attributes.
134
+
135
+ ```
136
+
137
+
138
+
115
139
  ### 該当のソースコード
116
140
 
117
141
 
@@ -122,9 +146,13 @@
122
146
 
123
147
  rootProject.name='My Application'
124
148
 
149
+ include ':app'
150
+
125
- include ':app',':module'
151
+ include ':MyModule'
126
-
152
+
127
- project(':module').projectDir = file('../../MyModule')
153
+ project(':MyModule').projectDir = new File(settingsDir, '../MyModule/')
154
+
155
+ include ':MyModule:module'
128
156
 
129
157
  ```
130
158
 
@@ -234,7 +262,7 @@
234
262
 
235
263
  androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
236
264
 
237
- implementation project(':module')
265
+ implementation project(path: ':MyModule:module') // この行を追加
238
266
 
239
267
  }
240
268