Android `svn checkout` 失败,出现“无法运行程序”“找不到指定的文件”错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22677210/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 06:19:39  来源:igfitidea点击:

`svn checkout` fails with the “cannot run program” “cannot find the file specified” error

androidsvnandroid-studio

提问by The One

I'm Checking a sample in google code. It requested me to checkout the source using SVN Checkout. Sine I am using Android Studio, I used the Subversion checkout options in VCS-->Checkout from version control-->Subversion. Howerver I encountered an error. Is their something I have done wrong?

我正在检查谷歌代码中的示例。它要求我使用 SVN Checkout 签出源代码。因为我使用的是 Android Studio,所以我使用了 VCS--> 从版本控制中的 Checkout-->Subversion 中的 Subversion 检出选项。但是我遇到了一个错误。他们是不是我做错了什么?

Checking out google sourcecode.

查看谷歌源代码。

Checkout Google Code

签出谷歌代码

Error = 2

错误 = 2

Error Cannot Find File Specified.

错误无法找到指定的文件。

As you can see in this, picture you can see the folders and of course the sources but how come it could not find it?

正如您在此看到的,图片您可以看到文件夹,当然还有来源,但为什么找不到它?

As you can see in this picture, you can see the folders of the sources.

正如您在这张图片中看到的,您可以看到源的文件夹。

回答by bahrep

The error Cannot load supported formats: Cannot run program "svn": Create process error=2, The system cannot find the file specifiedindicates that Android Studio / IntelliJ IDEA can't locate Subversion 1.8 command-line client on your machine. Follow these steps to solve the issue:

该错误Cannot load supported formats: Cannot run program "svn": Create process error=2, The system cannot find the file specified表明 Android Studio / IntelliJ IDEA 无法在您的机器上找到 Subversion 1.8 命令行客户端。请按照以下步骤解决问题:

  1. Make sure that you use the latest version of Android Studio IDE.
  2. Make sure that command-line svn.exe 1.8 client is installed on your system. You can get one at http://www.visualsvn.com/downloads/
  3. Add the command-line client to %PATH% environment variable.
  4. Restart Android Studio.
  1. 确保您使用最新版本的 Android Studio IDE。
  2. 确保您的系统上安装了命令行 svn.exe 1.8 客户端。你可以在http://www.visualsvn.com/downloads/得到一个
  3. 将命令行客户端添加到 %PATH% 环境变量。
  4. 重启安卓工作室。

You may want to read the related blog post about the same issue with IntelliJ IDEA: http://blog.jetbrains.com/idea/2013/12/subversion-1-8-and-intellij-idea-13/

您可能想阅读有关 IntelliJ IDEA 相同问题的相关博客文章:http: //blog.jetbrains.com/idea/2013/12/subversion-1-8-and-intellij-idea-13/

回答by Vinay

I am not sure if accepted answers works. But Android Studio-> Settings->Subversion-> Uncheck "Use command-line client" worked for me! enter image description here

我不确定接受的答案是否有效。但是 Android Studio-> 设置->Subversion-> 取消选中“使用命令行客户端”对我有用! 在此处输入图片说明

回答by user1003916

None of the answers here were working for me, though they were on the right track. This was the solution for me:

这里没有一个答案对我有用,尽管它们在正确的轨道上。这对我来说是解决方案:

  • Download SVN command line tool from http://www.visualsvn.com/downloads/as bahrep mentioned. Stick the binaries somewhere.

  • In IDEA: File > Settings > Version Control > Subversion > And then...

  • Make sure "Use command line client" is checked and select the path of your SVN.EXE.

  • 如 bahrep 所述,从http://www.visualsvn.com/downloads/下载 SVN 命令行工具。将二进制文件粘贴到某处。

  • 在 IDEA 中:文件 > 设置 > 版本控制 > Subversion > 然后...

  • 确保选中“使用命令行客户端”并选择 SVN.EXE 的路径。

By default, the path was simply set as svn. I had to change it to c:\wherever\i\put\it\svn.exe

默认情况下,路径简单地设置为svn. 我不得不把它改成c:\wherever\i\put\it\svn.exe

回答by Gujarat Santana

I Have Android studio version 0.8.14 Here is What I have done

我有 Android Studio 版本 0.8.14 这是我所做的

Go to settings-> (Preference in Mac)->subversion-> in general tab uncheckthe three box :

转到设置->(Mac 中的首选项)->subversion-> 在常规选项卡中取消选中三个框:

  1. User Command Line Client
  2. Use system default blalbala
  3. Update Administrative blabla
  1. 用户命令行客户端
  2. 使用系统默认 blabala
  3. 更新管理 blabla

And go to Network Tab : select SSL Protocol to : SSLv3

并转到网络选项卡:选择 SSL 协议至:SSLv3

Hope it Works. mine working like a charm.

希望它有效。我的工作就像一个魅力。

回答by Danilo Ramirez

An easier way for fixing this error, if you are on a Windows platform would be installing SVN directly from this download source http://sourceforge.net/projects/win32svn/

修复此错误的更简单方法,如果您使用的是 Windows 平台,将直接从此下载源http://sourceforge.net/projects/win32svn/安装 SVN

This runs an installer that automatically creates directories, and registers SVN routes for future command line use.

这将运行一个自动创建目录的安装程序,并注册 SVN 路由以供将来使用命令行。

回答by ssimm

I've got Android Studio v1.4.1 and...

我有 Android Studio v1.4.1 和...

  1. Check that the SVN plug in is present and activated. (/File/Settings, Subversion Integrationshould be in the list.
  2. / File/ Settings/ Version Control/ Subversion/ Uncheck use command line client
  3. Test communicating with the repository via / VCS / Browse VCS Repository / Browse Subversion Repository. The SVN Repositorieswindow should appear and you can add your repository there and see what is inside that repository.
  1. 检查 SVN 插件是否存在并已激活。(/文件/设置,Subversion 集成应该在列表中。
  2. /文件/设置/版本控制/Subversion/取消勾选使用命令行客户端
  3. 通过 / VCS / Browse VCS Repository / Browse Subversion Repository 测试与存储库的通信。该SVN库窗口应该出现,你可以在那里添加存储库,看看是在仓库里。

By default Use command line clientis checked but you can change that with / File / Other Settings / Default Settings / etc. etc.

默认情况下使用命令行客户端被选中,但您可以使用 / 文件 / 其他设置 / 默认设置 / 等进行更改。

回答by Syed Danish Haider

Follow easy steps:

遵循简单的步骤:

Download Apache Subversion command line tools from below url

从下面的 url 下载 Apache Subversion 命令行工具

https://www.visualsvn.com/downloads/

https://www.visualsvn.com/downloads/

extract the folder and save to some location and copy the path of folder now in android studio

提取文件夹并保存到某个位置,然后在 android studio 中复制文件夹的路径

Android Studio-> File->Other Settings->Default Setting->version control

Android Studio->文件->其他设置->默认设置->版本控制

now here only check use command line client and paste the above folder path.

现在这里只检查使用命令行客户端并粘贴上面的文件夹路径。

now you can give path of sub version.

现在你可以给出子版本的路径。