很多人應該都有這個疑問:自己的項目在Android Studio中build成功,為什么在第一次使用命令行build的時候還是要重新下載gradle?
如下圖:
以前我也不知道為什么(同時也懶得去了解),然后今天意外地在google文檔中找到了原因:
Note: Because Gradle and the Android plugin run independently from Android Studio, you need to update the build tools separately. Read the release notes to learn how to update Gradle and the Android plugin.
只要有Gradle,沒有Android Studio也能build項目,所以你在Android Studio中升級了gradle版本,第一次使用命令行的時候,還是要單獨下載gradle。
恩,還是要多看官方文檔~(注意上網姿勢)
doc_developer