为什么在Android项目建设和库文件夹无法COMMITED或推? [英] Why build and libs folders in Android project can't be commited or pushed?

查看:236
本文介绍了为什么在Android项目建设和库文件夹无法COMMITED或推?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Android的工作室与GitHub的库组合。所以,我刚才把我的整个项目,但我说过,我可以把我的只有src文件夹。有没有办法,我不能把我的构建和src的文件夹,或只是我做错了什么原因?当我试图去提交他们我收到一条消息,告诉我,有没有检测到更改,但是当我在我的仓库去那里没有这样的文件夹。

I'm using Android Studio in combination with GitHub repository. So I have just pushed my entire project but I mentioned that I can push only my src folder. Is there any reason that I can't push my build and src folders or just I'm doing something wrong? When I'm trying to commit them I'm receiving a message telling me that there is no changes detected, but when I go in my repository there is no such folders.

推荐答案

默认情况下Android的工作室放建立目录(无论是在项目级和模块级)的在的.gitignore

By default Android Studio puts the build directory (both at the project level and the module level) in the .gitignore.

这通常是所期望的行为,因为没有理由保持大部分生成的文件中的版本控制。摇篮将你下载的​​项目在任何机器上再次为您创建这些。

This is typically the desired behavior, as there is no reason to keep most of the generated files in version control. Gradle will create these again for you on any machine you download the project to.

如果您希望包括编译目录,简单删除 /编译同时从的.gitignore 在项目的根部和的.gitignore 在模块的根目录下。

If you want to include the build directories, simple remove /build from both the .gitignore in your project's root and the .gitignore in your module's root.

目录不应该在那儿默认,但如果你将文件添加到该目录和Git是不承认的变化,这就是我想看看

The libs directory should not be in there by default, but if you are adding files to that directory and Git isn't recognizing the change, that's where I would look.

这篇关于为什么在Android项目建设和库文件夹无法COMMITED或推?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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