Execute the command
# repo forall -c git checkout android-12.0.0_r31
The error is as follows:
File "aosp/.repo/repo/main.py", line 79
file=sys.stderr)
^
SyntaxError: invalid syntax
Reason: It is a syntax problem of the python2.xxx
version, just use python3
to execute
# python3 /usr/bin/repo forall -c git checkout android-12.0.0_r31