git clone android source code抛出error: invalid path 'luni/src/test/resources/org/apache/harmony/t

逆水行舟用力撑,一篙松劲退千寻。这篇文章主要讲述git clone android source code抛出error: invalid path ' luni/src/test/resources/org/apache/harmony/t相关的知识,希望能为你提供帮助。
【git clone android source code抛出error: invalid path ' luni/src/test/resources/org/apache/harmony/t】今天更新libcore源码时,遇到error: invalid path ‘luni/src/test/resources/org/apache/harmony/tests/java/lang/test?.properties‘,原因是android源码中文件的命名不符合windows系统的规范。

$ git clone https://android.googlesource.com/platform/libcore Cloning into ‘libcore‘... remote: Sending approximately 113.05 MiB ... remote: Counting objects: 879, done remote: Total 278583 (delta 166925), reused 278583 (delta 166925) Receiving objects: 100% (278583/278583), 113.05 MiB | 23.11 MiB/s, done. Resolving deltas: 100% (166925/166925), done. error: invalid path ‘luni/src/test/resources/org/apache/harmony/tests/java/lang/test?.properties‘ fatal: unable to checkout working tree warning: Clone succeeded, but checkout failed. You can inspect what was checked out with ‘git status‘ and retry with ‘git restore --source=HEAD :/‘

解决方案:
到已下载的libcore目录下,执行提示的语句:
git restore --source=HEAD :/


    推荐阅读