I am writing an android app using Android Studio, and I am trying to sync it to github. I have tried through the GUI VCS menu and through terminal, but both have resulted in the directory where my .java files should be turning into what seems to be a file I cannot open in github. So, my source files should be in ~/BrainGames/app/src/main/java/com/example/root/braingames/, but github creates a file at ~/BrainGames/app/src/main/java/com/example/root/ called braingames and this file cannot be opened to see the source files. I have tried remaking the repository through github and through Android Studio and I have tried syncing many times. I have no idea what I am doing wrong.
You should check your project directory, check all the files. If you have a Mac do ls -a -l. Check to see if you have multiple .git files, if you do, delete one of them. If you have multiple, it can cause this problem.
Related
I'm having trouble using gradle to build some project files from over at https://github.com/Hopding/JRPiCam. I am forcing myself to start learning gradle this week, but so far my cursory internet searches have given me only a vague sense of what gradle even does. I'm assuming that it's used to help keep track of disparate files hosted at varying locations across the internet, and maybe with file versioning. Anyways, for right now I would just like to compile a class into a Jar file and begin using it in my code to automate the camera on my raspberry Pi. The directions say to clone the directory onto my local computer, change the directory to the download location, and then, from the Windows PowerShell, use the command: ./gradlew jar to output a build directory where the compiled jars will reside. I followed the instructions, and though I received no error message, I also received no output directories. Nothing at all. I have installed gradle 6.9 on Windows 10 and made sure the path variable is set appropriately. So here is my question: 1. If I have this directory structure: , can I just cd into there and use a gradle command to compile? Thanks in advance.
I'm getting my java project to a finish and I'm about to export it to an easy useable program on the desktop.
In my program I'm using .txt files to keep all my data, so I've made a folder for my databases and my images.
The problem comes when I'm exporting the project to the desktop and it looks like everything mashes up and becomes one big pile of files instead of a folder structure I made it like in eclipse.
From eclipse
What is the right way to export the project, and how does I keep my filestructure?
Exporting to JAR file at the moment.
EDIT:
I'm also getting this error when I try to follow exampels from the internet.
'Utforsking/src/org/eclipse/wb/swing/FocusTraversalOnArray.java'
You can choose export->General->File System.
Then choose "Create directory structure for files" and that should work. I am using Luna.
If you hit problems, let me know.
i'm having an issue when i try to generate a jar file for a desktop game that i made using LibGDX. The problem is that i run the following command:
gradlew desktop:dist
in the Windows command line it generates the jar file in Project/desktop/build/libs folder but when i double click it it closes immediately.
I tried to run it with the following command:
java -jar desktop-1.0.jar
It prints this
Error
I'm new to LibGDX and graddle but i think the problem is in the gradle.build file in my desktop project folder, in the line
project.ext.assetsDir = new File("../core/assets");
My assets are in the core project folder since i unchecked the Android box in the LibGDX project setup and it runs properly when i do it in Netbeans (using the gradle project plug in).
I'm desperate, this is the last thing that i need to finish this project at the uni.
Any help is appreciated.
So i found the mistake, i opened the jar file with 7zip and saw that the images folder changed its name, so i changed it again and it worked.
Hope this helps someone in the future.
I have a pc and a laptop both running Windows Pro 8.1 and latest version of Netbeans. I log on the pc and the laptop with the same hotmail/windows account. I build my java projects on the pc and i save them on a OneDrive directory just fine all working ok. BUT when i try to open them on my laptop NetBeans sees the folders with all the files in them but doesnt find the projects so it is unable to open them. So i cant edit or work on any of my projects on my laptop. Is using a usb drive to save my projects my only way to mobility?
Turn off "Compile on save" for the project:
[project name]-> Properties -> Build -> Compiling.
This removes the project's build subdirectory, whose contents include
build/classes/.netbeans_automatic_build
build/classes/.netbeans_update_resources.
OneDrive sees these files as nameless with long extensions.
You can enable "Compile on save" in working sessions if desired,
just disable it when you want to make it available to other machines.
You may need to ensure the files are available offline. Windows 8.1 and OneDrive use a feature of Windows where files appear to be in a folder but may not actually be there yet (because they are in the cloud). While most applications are able to trigger files to be downloaded when opened, not all applications are compatible.
Try forcing the folder to be available offline by right clicking on the folder and selecting "Make available offline" and see if that resolves the problem.
NetBeans along with a number of other multiplatform applications tend to save configuration files in .settings/.configuration files. And unfortunately as of today the OneDrive client does not support syncing files the begin with a period. The OneDrive team is aware of this limitation and is looking into fixing this.
Not great solution, but a potential work around:
- Stick your NetBeans projects in a zip, 7z, tar or whatever convenient packaging format of your choice would be before you leave that machine.
Ultimately it sounds like your scenario is around using source control. While it is certainly not as easy as just using sync'ed folder, you could use a source control management tool like SVN, Mercurial, or Git.
I am having an annoying problem with organising my sources. We have a client server application with the server written in java and android as the client. The repository contains all the server files in one folder and all the android specific stuff in another at the top level.The Android folder however is not complete since it needs some files that exist in the server folder. I need a way to pull down the all the necessary files from 2 separate folders in my repo all in to one Intellij module/project.
My colleagues using eclipse were able to solve this by creating an android project, downloading the android source files from the repo and then using the add to build path > link source feature. This created symbolic links in the android project to the necessary files in the server folder so that android could compile.
How do i achieve this in Intellij? I hope this is clear but it is quite hard to explain. Thanks.
Also if this matters i am using SVN.