Android Studio 3.0正式版已發佈,於是趕緊升級體驗了一波。不出意外,果然項目有兼容問題,什麼問題呢?日誌如下:
Error:Unable to resolve dependency for ':app@local/compileClasspath': Could not resolve project :multiAdapter.
不明所以,那我們來看下詳細日誌
Unable to find a matching configuration of project :multiAdapter:
- Configuration 'debugApiElements':
- Required com.android.build.api.attributes.BuildTypeAttr 'local' and found incompatible value 'debug'.
local
與debug
不兼容,於是在 StackOverFlow 上查找了一波。原因是在主項目中有一個變種local,而在library中是沒有對應的。build.gradle 修改如下:
local {
...
matchingFallbacks = ['debug']
}
然後 sync project
問題 OK
Just mark !