0
我嘗試將google-play-services.jar添加到我的項目中,但是我遇到了這個錯誤。爲什麼? (Error:Cannot change configuration ':android:compile' after it has been resolved.)
有沒有人知道解決這個問題的方法?錯誤:解決後無法更改配置':android:compile'
我嘗試將google-play-services.jar添加到我的項目中,但是我遇到了這個錯誤。爲什麼? (Error:Cannot change configuration ':android:compile' after it has been resolved.)
有沒有人知道解決這個問題的方法?錯誤:解決後無法更改配置':android:compile'
在Android Studio中,你不需要添加jar文件,刪除jar文件和
打開的build.gradle文件的應用模塊目錄中。
Note: Android Studio projects contain a top-level build.gradle file and a build.gradle file for each module. Be sure to edit the file for your application module
在最新版本的play-services的依賴項下添加新的構建規則。例如:
dependencies {
compile 'com.google.android.gms:play-services:7.8.0'
}
保存更改,然後單擊同步工程與搖籃文件在工具欄中。
下面是官方link
這要看情況。你把瓶子放在哪裏?你的build.gradle是什麼? –