Couldn't locate the top of the tree. Always source build/envsetup.sh from the root of the tree.

11 views
Skip to first unread message

Julian Waters

unread,
3:12 PM (2 hours ago) 3:12 PM
to Android Building
Hi all,

I'm trying to compile Android following the instructions at https://source.android.com/docs/setup/build/building but running source build/envsetup.sh in the platform directory always returns "Couldn't locate the top of the tree. Always source build/envsetup.sh from the root of the tree." without fail. Trying to run the command from anywhere else just leads to bash not being able to find envsetup.sh at all, so that's out of the question. Some digging into the source code reveals that the script is looking for build/make/core/envsetup.mk but no such file exists in the entire source tree, only build/core/envsetup.mk so this will always fail. But I seem to be the only one who cannot compile Android at all, it works for everyone else despite the file not existing, otherwise this strange code would've been changed long ago. Is there anything I am doing wrong running the command? Thanks in advance!

best regards,
Julian

Dan Willemsen

unread,
3:18 PM (2 hours ago) 3:18 PM
to android-...@googlegroups.com
Something has gone very wrong in your sync -- build/make has existed ever since Android 8 in 2017 (at which point build/core became a symlink to build/make/core). I'd recommend you verify your sync procedures in https://source.android.com/docs/setup/download

- Dan

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/android-building/da48daf2-a5ff-4785-8868-7b44d1ed920bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages