1、本地gradle版本要与android studio中的gradle插件相匹配,否则在android studio外打包项目时会提示错误。
将本地版本由4.5.1修改为5.5.1,并修改.bash_profile文件中的gradle_name的路径。
lishuaikangdeMacBook-Pro:waiter lishuaikang$ gradle assembleDebug
Starting a Gradle Daemon, 1 busy and 1 incompatible Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/lishuaikang/AndroidStudioProjects/waiter/app/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Minimum supported Gradle version is 5.1.1. Current version is 4.5.1. If using the gradle wrapper, try editing the distributionUrl in /Users/lishuaikang/AndroidStudioProjects/waiter/gradle/wrapper/gradle