本文介绍了如何运行Google的新"places_compat_compatify.sh"兼容性脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试迁移到Google提供的新的地方SDK,他们提供了一个兼容性脚本,可以自动执行该过程: https://developers.google.com/places/android-sdk/client-migration#compat-script

I am trying to migrate to the new places SDK provided by google and they provided a compatibility script winch automates the process: https://developers.google.com/places/android-sdk/client-migration#compat-script

但是我认为,我没有按照应有的方式运行它,而是在Android Studio的终端上运行它,当它运行时,它只是说"sed无法读取文件[文件名],不存在这样的目录我正在用我的项目目录编写命令.

But I think that, I am not running it the way I should, I am doing it from my terminal in Android Studio and when it runs it simply says "sed can't read file [file name] no such directory exist" I am writing the command with my project's directory.

推荐答案

如果有人对此感兴趣,我将其修复:

I fixed it if anyone is interested that's how:

首先,您需要下载git bash以便能够在Windows上运行Linux命令,请在此处下载: https://git-scm.com/downloads

First, you need to download git bash in order to be able to run Linux commands on Windows, download it here: https://git-scm.com/downloads

第二次复制以下内容: https://developers .google.com/places/android-sdk/client-migration#compat-script 并将其保存为本地计算机上的某个位置,即:places_compat_compatify.sh

Second copy the contents of: https://developers.google.com/places/android-sdk/client-migration#compat-script and save them somewhere on your local computer as: places_compat_compatify.sh

现在打开git bash并转到保存脚本的目录(假设您将其保存在桌面上),然后必须键入cd Desktop和cd D:\(如果您将其保存在本地磁盘D上,则依次类推)上,然后键入dir以检查文件是否存在.

now open git bash and go to the directory where you saved the script (let's say you saved it on your desktop) then you must type cd Desktop, and cd D:\ if you saved it on then local disk D and so on, and then type dir to check if the file is there.

然后运行此命令./places_compat_compatify.sh路径到Android项目1.0.0

and then run this command ./places_compat_compatify.sh path-to-android-project 1.0.0

然后打开android studio,并将您的实现和import语句替换为新的.

then open android studio and your implementations and import statements should be replaced with the new ones.

这篇关于如何运行Google的新"places_compat_compatify.sh"兼容性脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 05:41