It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

SDK location not found error while Running writeProjectInfo script

Deleted user Jan 21, 2019

Hi,

I want to run "set ANDROID_HOME = $(bamboo.ANDROID_HOME) gradlew writeProjectInfo" script in a task bu I got "SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable." error. I write "sdk.dir = C=\\Users\\myName\\AppData\\Local\\Android\\Sdk" in my local.properties file in my project bu it does not worked. What is the reason if this error? How can I fix?

Thanks.

1 answer

0 votes

Hi @[deleted],

  • Can you share in what task you are running setting the below command?
    set ANDROID_HOME = $(bamboo.ANDROID_HOME) gradlew writeProjectInfo
    I'm asking that because there is a mix between Windows and Linux way of treating variables. Windows variables should be evaluated like:
    %BAMBOO_<MY_VAR>% 
    so on a windows agents it would be:
    set ANDROID_HOME = %BAMBOO_ANDROID_HOME% gradlew writeProjectInfo
  •  Can you please adjust the sdk.dir line from local.properties file so it looks like the one below?
    sdk.dir = C:/Users/myName/AppData/Local/Android/Sdk
    Java applications usually interpret forward slashes as path separators too and this will save you from using extra characters. It was also strange to me that you had a an equal sign "=" instead of a colon ":", maybe just a typo.

Please notice that I'm not an expert on gradle, but I'm trying to give you some tips so you can move on.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Unable to add or edit Bitbucket Cloud repository in Bamboo

On 31 May, a GDPR-related change went live in the Bitbucket Cloud API that resulted in users not being able to create or edit Bitbucket Cloud Linked repositories in Bamboo. This API update removed t...

663 views 2 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you