for me, I just modify the line in settings.gradle:
project(':test').projectDir = new File(rootProject.projectDir, '~/android-test')
to
project(':test').projectDir = new File(rootProject.projectDir, '/Users/Michael/android-test')
which means avoid using "~" in the settings.gradle.