Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

kotlin.KotlinNullPointerException (no error message) while building APK using Jenkins

I am new to Jenkins and trying to generate APK.I am getting the following error: enter image description here

I have added git credentials and gradle script is as below: enter image description here

Note: I have a build Type named "Dev"

like image 698
Kishita Variya Avatar asked Dec 02 '22 09:12

Kishita Variya


1 Answers

I had this problem while configuring my jenkins for an android project, and finally found the problem, after even formatting my pc.

The gradle just cannot find where the Android SDK is located. Adding this to .zshrc (or .bashrc, whatever shell you are using) resolved my problem:

export ANDROID_HOME=/Users/<your-user-here>/Library/Android/sdk

Don't forget to verify if the specified folder above contains the folder sdk.

Edit: I did this in a macOS environment, you should look for the correct sdk location in your OS.

like image 94
kobuchi Avatar answered Dec 11 '22 16:12

kobuchi