git 如何将项目从 bitbucket 存储库导入 Android Studio?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34149576/
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
How to import a Project from bitbucket repository to Android Studio?
提问by Ujjawal
I have repository in BitBucket while cloning project
克隆项目时,我在 BitBucket 中有存储库
If I select "?mport Gradle project"
如果我选择“?导入 Gradle 项目”
On clicking "OK" , it start building project , then gives error
单击“确定”后,它开始构建项目,然后出现错误
If I select "Configure" to configure android project it build project but it didn't run .
如果我选择“配置”来配置 android 项目,它会构建项目但它没有运行。
How to resolve this error ?
如何解决此错误?
回答by KawaiKx
launch bitbucket.org, login to your account, select the repo which you want to import. select HTTPS and copy the link.
启动 bitbucket.org,登录到您的帐户,选择要导入的存储库。选择 HTTPS 并复制链接。
launch Android studio. select 'Check out the project from Version Control' paste the link, fill in other information as asked and confirm.
启动安卓工作室。选择“从版本控制中签出项目”粘贴链接,按照要求填写其他信息并确认。
this will clone your bitbucket repo in the android studio.
这将在 android studio 中克隆您的 bitbucket 存储库。
回答by TejjD
BitBucket is a GitHUB based site.
BitBucket 是一个基于 GitHub 的站点。
You simply need to clone the repo you need to your local pc. Open that repo (project) in Android Studio, and Android Studio will give you the option to enable “VCS” (This is Version Control System). It will automatically sync with your repo, and list all your branches and so on.
您只需要将所需的存储库克隆到本地 PC。在 Android Studio 中打开该存储库(项目),Android Studio 将为您提供启用“VCS”(这是版本控制系统)的选项。它会自动与你的 repo 同步,并列出你的所有分支等等。
You don't need to do an import, if it is already an Android Studio project.
如果它已经是一个 Android Studio 项目,则不需要进行导入。
For your error, try these as reference:
对于您的错误,请尝试这些作为参考:
Volley might be giving you an issue (File Structure stuff)
回答by Mohsin Raza
You need to make sure that each submodule in your project has its own build.gradle file. The name 'default' happens because your outer build.gradle is trying to build a project that doesn't know how to build itself, thus it is given the name 'default.' Try doing that and see what happens.
您需要确保项目中的每个子模块都有自己的 build.gradle 文件。出现“default”这个名字是因为你的外部 build.gradle 试图构建一个不知道如何构建自己的项目,因此它被命名为“default”。尝试这样做,看看会发生什么。
回答by CodeToLife
The owner of the project should give you the access to one.
Then in android studio go to VSC tab in most top bar and select
VCS --> git --> clone..
Then in dialog popup in the first editbox past the 'httpsed' url and press "Clone"
Then wait untill project is clonned
该项目的所有者应授予您访问权限。然后在 android studio 中转到最顶部栏中的 VSC 选项卡并选择
VCS --> git --> clone..
然后在第一个编辑框中的对话框弹出窗口中通过“httpsed”网址并按“克隆”然后等到项目被克隆