Windows Cygwin问题整理

1. Windows Cygwin 下载AOSP问题

下载参考: https://honey200.wordpress.com/2011/11/17/download-android-source-code-in-windows/

(1). repo init时错误提示error.GitError: manifests init: fatal: Invalid path ‘**’: No such file or directory

原因:Cygwin中使用的Git可能是MINGW64-Git,即从git-scm中下载安装的。使用Cygwin下载安装Git,并把Cygwin bin的PATH路径放在MINGW64-Git的前面。

(2). ssh错误提示no matching cipher found

详细提示:no matching cipher found. Their offer: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc

解决方法:
在~/.ssh/config文件中添加如下内容:

Host *  
  SendEnv LANG LC_*  
  Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc   

参考: ssh_config 和 https://www.reddit.com/r/MacOS/comments/7i8ao5/ssh_not_working_after_update_to_10132/#bottom-comments

(3). repo sync时提示error: unable to create file tests/P_str_escape/str\escape.rs: No such file or directory

可以使用 repo –trace sync 打印出sync日志,方便发现错误位置。

解决方法:
实际要创建的文件并不是tests/P_str_escape/str\escape.rs
而是tests/P_str_escape/str/escape.rs
\frameworks\compile\slang\tests\P_str_escape 这一级目录已经存在了,只需要创建str 目录,并在str 目录中创建 escape.rs 文件(文件内容为空)

参考:http://blog.csdn.net/u013553529/article/details/50616725

2. Windows Cygwin GUI显示出错

以git gui为例说明。
错误提示:

application-specific initialization failed: no display name and no $DISPLAY environment variable
Error in startup script: couldn't load file "/usr/bin/tk86.dll": No such file or directory
    while executing
"load /usr/bin/tk86.dll Tk"
    ("package ifneeded Tk 8.6.8" script)
    invoked from within
"package require Tk"
    (file "/usr/bin/gitk" line 10)

解决方法:
需要安装Cygwin-X来解决此问题。

  1. 下载X11类别下面的xinit,安装所有相关的依赖;
  2. 在Window Menu中新添加了Cygwin-X,运行XWinServer;
  3. 打开Cygwin终端,运行 export DISPLAY=:0.0 (这种方式每次打开终端都要执行)
    或者执行 echo “export DISPLAY=:0.0” >>~/.bash_profile
    注: :0可以理解成Cygwin-X的绑定位置,此值会变,要根据此值设置DISPLAY的内容。
    示例

你可能感兴趣的:(android)