必要文件在GitHub上没有显示出来的问题,适用于Android项目。

huangapple go评论61阅读模式
英文:

Necessary files not showing up on github for android project

问题

我是新手使用Android Studio。每次我在GitHub上分享一个新项目时,一些必要的文件和文件夹(settings.gradle、gradle/wrapper和.idea文件夹、gradlew、gradlew.properties、gradlew.bat)不会显示在GitHub上,这使得作为学生远程评分变得不可能。

唯一显示的文件是app文件夹、.gitignore、build.gradle和gradle.properties文件。

请帮忙!

英文:

enter image description here

I'm new to android studio. Every time I share a new project on github, some of the necessary files and folders (settings.gradle, gradle/wrapper and .idea folder, gradlew, gradlew.properties,gradlew.bat) needed for someone to clone my project are not showing up on github, making it impossible for me to be graded remotely as a student.

The only files showing up are the app folder, the .gitignore, build.gradle, and gradle.properties files only.

Please help!

答案1

得分: 0

你可以通过使用 git check-ignore --verbose gradle/wrapper/gradle-wrapper.jar 来查找为什么某些文件,如gradle包装器被忽略。

之后,你只需要调整相关的配置文件并删除不必要的行。根据你的情况(从你在原问题上的最后一条评论中我能看出),你用户目录下的.gitignore文件是问题所在。

英文:

You can find out why certain files like the gradle wrapper are ignored by using git check-ignore --verbose gradle/wrapper/gradle-wrapper.jar.

Afterwards, you just need to adjust the relevant config file and remove the arbitrary lines. In your case (as I can see from your last comment on the original question), the .gitignore file in your user directory is the problem.

huangapple
  • 本文由 发表于 2020年8月6日 19:28:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/63282601.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定