[Bug Mc-108366] – Error while building android task with Jenkins: SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting
1. Check whether the Android SDK path has been configured:
Go to the user root directory and view the environment variable profile. Bash_profile. Check whether the Android SDK path is correctly configured in the environment. After checking, it is found that gardle and Android SDK path configuration are normal and correct
In Jenkins project, run gradle build, build success!!
This is strange??
The last universal search, found the blog: www.cnblogs.com/kaerxifa/p/…
As prompted, in the Jenkins project folder, create a new file: local.properties
Then write the SDK’s address to the file:
Run Jenkins again and find job built successfully!! I don’t know why Jenkins didn’t execute the command line successfully when it was running well before…