Drawables 不会推送到 github Android Studio [英] Drawables won't push to github Android Studio

查看:21
本文介绍了Drawables 不会推送到 github Android Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我不知道为什么会这样,但是当我提交并推送到 GitHub 时,无论我将多少 png 文件或图片添加到我的可绘制文件夹中,当我通过它访问存储库时,drawables 文件夹永远不会更改我在 GitHub 上的个人资料.

Hello I am not sure why this is the case, but when I commit and push to GitHub no matter how many png files or pictures I add to my drawable folders, the drawables folder never changes on the repository when I access it thru my profile on GitHub.

示例图片:

我做了研究,但没有找到太多实质内容

I have done research, but didn't find much substance

为什么构建和Android 项目中的 libs 文件夹无法提交或推送?

我很惊讶没有很多关于这个的文章.如果用户提交了一个项目结束错误并且需要恢复 Github 上的所有内容只是为了发现每个 drawable 或 png 文件都将丢失,这可能是致命的.

I was surprised that there is not a lot written on this. This can be fatal if a user commits a project ending error and needs to recover everything on Github just to find that every drawable or png file will be lost.

推荐答案

这取决于您如何将图像添加到 Android Studio.如果您将图像放到它们各自的文件夹中,而没有通过文件资源管理器让 AS 知道,那么这些图像将不会添加到 git 中,它们将在项目资源管理器中显示为红色.如果您复制图像并将它们粘贴到 AS 项目资源管理器中各自的文件夹中,那么它们应该被添加到 git 并显示为绿色,如下所示.

It depends on how you add the images to Android Studio. If you drop the images their respective folders without letting AS know via a file explorer then the images will not be added to git and they will appear red in the project explorer. If you copy the images and paste them into their respective folders within the AS project explorer then they should be added to git and show up green as shown below.

如果您希望添加到 git 的文件尚未添加,则只需在项目资源管理器中右键单击该文件并选择 Git -> 添加或使用 Ctrl+Alt+A.

If there are files you wish to add to git that aren't added already then just right click on the file in the project explorer and select Git -> Add or use Ctrl+Alt+A.

这篇关于Drawables 不会推送到 github Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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