错误与进口的Andr​​oid项目的Andr​​oid * *工作室 [英] Error with importing android project *Android Studio*

查看:251
本文介绍了错误与进口的Andr​​oid项目的Andr​​oid * *工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实现一个Git项目到我的Andr​​oid项目。当我加入了Git的项目的Java类,他们变成了红色。

I am implementing a git project into my android project. When i added the git's project java classes they turned red.

我发现这个问题。但答案没有为我工作。
Android工作室 - 项目所有文件名都是红色,但没有错误

I found this question. But the answers don't work for me. Android Studio - All file names in project are red but there are no errors

我想答案是,因为VCS的控制,我需要删除的文件夹.idea。但我有我的项目到处他们没有.idea文件夹。

I thought the answer would be, because of VCS control, and i need to delete the .idea folder. But i have looked everywhere in my project and their is no .idea folder.

推荐答案

听起来你添加新的文件到Git项目。在这种情况下,AndroidStudio会变成红色的,因为他们没有被上演或承诺但这些文件。

Sounds like you are adding new files to a Git project. In this case, AndroidStudio will turn those files red because they haven't been staged or committed yet.

尝试导航到你的项目并键入 git的状态。你应该会看到那些相同的文件,不分级。

Try navigating to your project and typing git status. You should see those same files as unstaged.

要解决此问题,只需阶段这些文件的git(可以使用 git的添加-a 来一次全部添加),他们应该变成绿色。或者,您可以右击这些文件红色 - > Git的 - >添加。

To resolve this, simply stage those files to git (you can use git add -a to add them all at once) and they should turn green. Alternately, you can right click on those red files -> Git -> Add.

最后,你提交文件后,就应该变成蓝色。

Finally, after you've committed the files, they should turn blue.

这篇关于错误与进口的Andr​​oid项目的Andr​​oid * *工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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