英文:
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文件。
请帮忙!
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论