简体   繁体   English

如何将项目从bitbucket存储库导入Android Studio?

[英]How to import a Project from bitbucket repository to Android Studio?

I have repository in BitBucket while cloning project 克隆项目时我在BitBucket中有存储库

在此输入图像描述

If I select "Ïmport Gradle project" 如果我选择“ÏmportGradleproject”

在此输入图像描述

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 ? 如何解决此错误?

launch bitbucket.org, login to your account, select the repo which you want to import. 启动bitbucket.org,登录您的帐户,选择您要导入的仓库。 select HTTPS and copy the link. 选择HTTPS并复制链接。

launch Android studio. 推出Android工作室。 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工作室中克隆你的bitbucket repo。

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). 在Android Studio中打开repo(项目),Android Studio将为您提供启用“VCS”的选项(这是版本控制系统)。 It will automatically sync with your repo, and list all your branches and so on. 它会自动与您的仓库同步,​​并列出您的所有分支机构等。

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) Volley可能会给你一个问题(文件结构的东西)

If you have modules as part of the repo 如果您将模块作为回购的一部分

Refer to this answer 请参阅此答案

You need to make sure that each submodule in your project has its own build.gradle file. 您需要确保项目中的每个子模块都有自己的build.gradle文件。 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.' 名称“default”的发生是因为您的外部build.gradle正在尝试构建一个不知道如何构建自身的项目,因此它的名称为“default”。 Try doing that and see what happens. 尝试这样做,看看会发生什么。

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 然后在android studio中转到最顶部栏中的VSC选项卡并选择
VCS --> git --> clone.. VCS - > git - >克隆..
Then in dialog popup in the first editbox past the 'httpsed' url and press "Clone" Then wait untill project is clonned 然后在第一个编辑框中的对话框弹出窗口中超过'httpsed'网址并按“克隆”然后等待直到项目被克隆

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM