1. 程式人生 > >【bug】Could not find method compile() 解決

【bug】Could not find method compile() 解決

整合第三方庫出現
Error:Could not find method compile() for arguments [com.android.support:design:23.4.0] on DefaultExternalModuleDependency{group=‘com.android.support‘, name=‘appcompat-v7‘, version=‘23.4.0‘, configuration=‘default‘} of type org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency.

Please install the Android Support Repository from the Android SDK Manager.
<a href="openAndroidSdkManager">Open Android SDK Manager</a>

 

  專案裡面多個compile放在一行出現如上問題,解決是每個compile佔一行,不要都放在一行, 備註:顯示已經換行,還無效的,需複製此報錯的compile,在正確的 compile後面打換行符,然後再貼上