如何提交和推送Android应用程序/项目,以pre-现有空到位桶库与Android工作室? [英] How to Commit and Push Android App/Project to Pre-existing Empty Bitbucket Repository with Android Studio?

查看:523
本文介绍了如何提交和推送Android应用程序/项目,以pre-现有空到位桶库与Android工作室?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我运行的是最新版本的Andr​​oid工作室(0.6.1),并希望推到位桶,因为它有免费的私人回购协议(让我们避免任何Github上VS BB评论)。我创建了一个简单的回购协议来测试VCS功能,并正在使用,除了应用程序被称为TestApp和项目文件的默认CONFIGS一个新的Andr​​oid项目位于我的桌面上。

我执行以下步骤:


  1. VCS>导入到版本控制>创建Git仓库

  2. 使用默认路径:C:\\用户\\用户\\桌面\\ TestApp

  3. VCS>的Git>结帐从版本控制

  4. 给<一个href=\"https://sanecito@bitbucket.org/sanecito/testrepo.git\">https://sanecito@bitbucket.org/sanecito/testrepo.git如VCS路径C:\\用户\\用户\\桌面\\作为父目录,并作为testrepo文件夹

  5. 当给你想为你创造已签出到C源代码一个Android Studio项目:\\用户\\用户\\桌面\\ testrepo,点击是

  6. 创建从现有来源的项目

  7. 项目名称:testrepo项目位置:C:/用户/用户/桌面/ testrepo

  8. 在新窗口中打开项目

  9. 添加文本文件文本测试在IDE中testrepo,​​你想添加以下文件到Git?[...]>是

  10. 在菜单绿色箭头按钮命中VCS(提交更改)

  11. 将鼠标放在提交按钮,点击提交并推送

  12. 在接下来的窗口中点击推

推送窗口消失,并有在底部短暂的弹出窗口,有没什么推,尽管在previous窗口显示,有变更项目
有几个问题我的过程中,首先是,我想创建一个香草的Andr​​oid项目,然后推入空的回购,但在我试图链接它,它会创建一个新的项目(不ABET香草应用程序)。即使有新项目时,我打提交并推送它实际上没有推到了回购。

我知道,有这样一个问题:<一href=\"http://stackoverflow.com/questions/19099244/how-to-import-a-project-into-bitbucket-repository-from-android-studio\">How导入到项目在Android工作室到位桶仓库的呢?
然而,没有任何的答案是解决什么应该是一个简单的问题,因为它们不是描述性的(我该如何即假定即使设置插件)是有用的。有人能告诉我该怎么做两件事情:


  1. 与现有的Andr​​oid项目设置Git和应用开放推向回购的到位桶

  2. 设置Git的配置与全新的Andr​​oid工作室安装这样一个人可以从到位桶回购Android应用code拉到上工作


解决方案

全面的解决方案可以在这里找到:
<一href=\"https://www.youtube.com/watch?v=IBEbJUEDWZQ\">https://www.youtube.com/watch?v=IBEbJUEDWZQ

我输入了如何安装插件,以及如何从一个非空回购拉(随意使用你自己选择的父目录,我只是觉得这导致一个干净的设置),视频有怎么推到一个空的回购


  1. 设置到位桶插件


    1. 下载到位桶插件IDEA / Android的工作室

      1. 在写作(2014年6月25日)的官方插件不支持IDEA13其中Android Studio中的当前版本(0.6.1)使用。然而,有一个非官方版本的作品(获得最新版本)


    2. 开启Android的工作室

    3. 在主菜单中,点击配置,然后插件

      1. 单击从磁盘安装插件,导航到插件.zip文件的位置,选中它,点击OK。


    4. 重新启动Android的工作室提示时


  2. 拉到位桶库到本地计算机存储库


    1. 如果Android的工作室尚未运行,启动它

    2. 从快速启动菜单,选择从版本控制签出

    3. 有关正确的父目录点击...,然后定位到C:\\用户\\ [用户​​名] \\回购

      1. 如果'回购'不存在,通过点击新建文件夹按钮(或热键ALT +插件)创建一个新的文件夹并将其命名为新的文件夹'回购'


    4. 在结帐由下拉列表中选择到位桶',如果根据提示输入凭据到位桶

    5. 从库列表:下拉列表中,您将看到您想要的回购。选择它,然后单击确定


So I'm running the latest version of Android Studio (0.6.1) and want to push to BitBucket because it has free private repos (let's avoid any Github vs BB comments). I've created a simple repo to test the VCS functionality and am using a new Android project with the default configs except the app is called 'TestApp' and the project file is located on my desktop.

I've performed the following steps:

  1. VCS>Import into Version Control>Create Git Repository
  2. Use default path: "C:\Users\User\Desktop\TestApp"
  3. VCS>Git>Checkout from Version control
  4. Give https://sanecito@bitbucket.org/sanecito/testrepo.git as VCS path and "C:\Users\User\Desktop\" as parent directory, and testrepo as folder
  5. When given "Would you like to create an Android Studio project for the sources you have checked out to C:\Users\User\Desktop\testrepo", hit "Yes"
  6. Create project from existing sources
  7. Project name: testrepo Project location: C:/Users/User/Desktop/testrepo
  8. Open project in new window
  9. Add textfile with text "test" to testrepo in IDE, "Do you want to add the following file to Git? [...]">Yes
  10. Hit VCS with green arrow button in the menu (Commit Changes)
  11. Mouse over 'Commit' button, hit commit and push
  12. Hit 'Push' in next window

Push window vanishes and there's a brief pop-up window at the bottom that there's "Nothing to push" despite showing in the previous window that there were changes to the project There are several issues with my process, the first is that I would like to create a vanilla Android project and then push to the empty repo, but in my trying to link it it creates a new project (abet without the vanilla app). Even with that new project when I hit commit and push it isn't actually pushed to the repo.

I'm aware that there's this question: How to import a Project into bitbucket repository from Android Studio? However, none of the of the answers are useful to solving what should be a simple issue as they aren't descriptive (i.e. how am I even supposed to setup the plug-in). Could someone tell me how to do two things:

  1. Setup Git with an existing Android project and application open and push to a repo on BitBucket
  2. Setup Git config with a fresh Android Studio install such that a person can pull from a BitBucket repo Android app code to work on

解决方案

The solution in full can be found here: https://www.youtube.com/watch?v=IBEbJUEDWZQ

I typed up how to setup the plugin and how pull from a non-empty repo (feel free to use parent directory of your own choosing, I just felt this lead to a clean setup), the video has how to push to an empty repo

  1. Setting up BitBucket plugin

    1. Download BitBucket Plugin for IDEA/Android Studio

      1. At the time of writing (2014/06/25) the official plugin does not support IDEA13 which the current version of Android Studio (0.6.1) uses. However, there is an unofficial version that works (get the latest version)

    2. Open Android Studio
    3. On main menu click 'Configure' and then 'Plugins'

      1. Click 'Install plugin from disk', navigate to the plugin .zip file location, select it, and hit OK.

    4. Restart Android Studio when prompted

  2. Pull BitBucket repository onto local computer repository

    1. If Android Studio is not already running, start it
    2. From the 'Quick Start' menu, select 'Check out from Version Control'
    3. For 'Parent directory' click "..." on the right and navigate to C:\Users\ [username]\repos

      1. If 'repos' does not exist, create a new folder by clicking the 'New Folder' button (or hotkey Alt+Insert) and name the new folder 'repos'

    4. In the 'Checkout from' dropdown select 'BitBucket' and enter BitBucket credentials if prompted
    5. From the 'Repository list:' dropdown, you should see your desired repo. Select it, and click 'OK'

这篇关于如何提交和推送Android应用程序/项目,以pre-现有空到位桶库与Android工作室?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆