1
curl https://storage.googleapis.com/git-repo-downloads/repo > repo
chmod a+x repo
./repo init -u https://android.googlesource.com/platform/manifest -b android-7.1.1_r6
./repo sync
. build/envsetup.sh

fails with:

build/envsetup.sh: line 508: LUNCH_MENU_CHOICES[@]: unbound variable

on Ubuntu 16.04.

Also mentioned at: https://bbs.archlinux.org/viewtopic.php?id=135180

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985

1 Answers1

1

On my .bashrc I had a:

set -u

Obviously envsetup.sh is not high quality enough to not have undefined variables or be a non sourced standalone script.

So either remove it, or add a:

set +u

to disable it.

You also likely want to get rid of:

set -e

but I haven't tested that.

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985