fatal: unable to stat "file": Permission denied - java

I searched and tried answer but problem didn't solve, I git init into android project and after making first push, I changed alot of things removed added new files and fonts (I don't remember if i git added during this) now when I ready to pus i ran command git status I see files in red as untract files, then I ran git add . but Im getting this error:
warning: LF will be replaced by CRLF in app/app.iml.
The file will have its original line endings in your working directory.
fatal: unable to stat 'app/src/main/res/drawable/slide_thre.jpg':
Permission denied
the file slide_thre.jpg I deleted way before git add wen I was working but its still showing this error, I dont know if its cached
I tried closing IDE before git add and tried other solution but didn't work

Try closing any programs that have the folder open, such as editors,
explorer windows, command prompts, and FTP programs. This always fixes
the issue for me on Windows.
You can also try "invalidate & restart" your IDE, that should clean the caches.
Lastly, try disabling the virus checker just to see if it would let you through then.
SO Post

did you close your photoviewer application which open slide_thre.jpg?

Related

The project was not built due to "Could not delete '/Help/build/classes/exportFile'.".

When I imported my project in Eclipse Oxygen, it gave the below error.
"The project was not built due to "Could not delete '/Help/build/classes/exportFile'.". Fix the problem, then try refreshing this project and building it since it may be inconsistent"
Googled and got that to delete the contents of the bin folder and clean the project. But there's no bin folder. Tried cleaning, still the same error. What else can be done
You found a solution yourself, but here are some more informations about this error.
First, you said, your search brought up answers where deleting the bin-directory manually solves this but you don't have this directory. Reason for that is that you configured your project to write classes to the classes-directory (bin is the default).
The "cannot delete" message appears mainly on Windows systems if there is another process keeping a lock on the directory or files within. The classic reason for that is that you currently run the application or that you have an Explorer window open that shows the content of this directory. Closing the application/Explorer window normally solves the problem. Sometimes the lock keeps staying. A way to find the culprit is using Sysinternal's ProcessExplorer. It allows you to search for it by using Find->Find handle or DLL. The result can be clicked on and you can even forcefully close that entry, releasing the lock (some programs don't like that but I never had any problems doing that).
But sometimes it's actually necessary to reboot the system if you can't get rid off the lock otherwise.

IntelliJ IDEA doesn't start on my Windows machine

This morning when I was trying to load IntellJ it doesn't boot up. I see idea.exe under process tab. When I tried to run idea.bat from command line, I get the following:
Invalid Log Path: Log path 'Ç:\Users\NAME.IdeaIC2016.3\system\log' is inaccessible. If you have modified the idea.log.path property please make sure it is correct otherwise please re-install the IDE.
Check folder permissions, it may be owned by admin for some reason. Try removing this folder so that IDEA creates it again.
Run disk tool with permissions fix.
Taken from:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206156759-IntelliJ-IDEA-14-1-1-on-Mac-OSX-Log-path-Users-username-Library-Logs-IdeaIC14-is-inaccessible-

Hello World Compile Error - Android

I'm trying to setup the android dev kit, I've installed everything and tried to setup a Hello World activity, however when I build the project I get the error:
Cannot run program "C:\Program Files\Java\jdk1.7.0_45\bin\java" (in directory "C:\Users\Matt\.IntelliJIdea13\system\compile-server"): CreateProcess error=2, The system cannot find the file specified
All of this is auto generated from my IDE, so I'm not sure what the problem can be, has anyone encountered this before?
First of all as said in the comment the error is that your file missing, so the first step is to see if the file is even there, if not I would reinstall your jdk (as that file should not be missing).
If the file is there than it is most likely the case that the space in the directory is causing issue for some reason. To fix this you can either manually copy your jdk to a new directory (without a space) and replace your current jdk's location with the new one. You could also uninstall the current java distribution and reinstall the new one in a location without spaces.

Can't compile due to missing files

I get the following message:
The project was not built due to "File not found: path/.DS_Store.".
Fix the problem, then try refreshing this project and building it since it may be inconsistent
This is a error message I've never seen before. I'm running Eclipse Indigo on a Mac OSX with Lion. As far as I understand the message my .DS_Store file is responsible for me not being able to compile, but how can that file mess with my code?!
Maybe what's interesting or not:
My file structure is as follows:
com.packagename
And it says File not found: bin/com/.DS_Store. It can't find the .DS_Store file in my binary output folder?
Try to refresh the project in the Project Navigator (F5 or Right click/Refresh).
These error messages are most likely caused by modifications in the file system outside Eclipse (e.g. external builder, or vcs tool is used), and Eclipse detects during the build that the file is changed.
Alternatively, if you are using a recent enough Eclipse, you could try two settings in the Preferences that might help in these cases as well: check Refresh using native hooks and Refresh on access in General/Workspace page in the Preferences dialog.

Ant Copy Task: Failed to copy due to java.io.FileNotFoundException

I'm trying to compile a Flex application in Ant (no problems here, I can do it fine). When I try to publish the contents of the project to a Windows network drive (known as "Z:\" on my system), I get the following LAME exception thrown by Java/Ant:
BUILD FAILED
C:\workspace\bkeller\build.xml:42: Failed to copy C:\workspace\bkeller\web\assets\text\biography.html to Z:\web\bkeller\assets\text\biography.html due to java.io.FileNotFoundException Z:\web\bkeller\assets\text\biography.html (The system cannot find the file specified)
Which kind of sucks. I can't find any way to get rid of this problem and it's pretty crucial to my project that I get this working. I know for sure that I have read/write/execute permissions on the network drive, I can create/edit/delete files on the drive just fine through Windows explorer.
Drive Z is a network mount to virtualbox, allowing me to get access to my host OS, Ubuntu. I've double checked that it has write permissions. Any ideas?
Seeing as how Z is a network mount, verifying that it works (e.g. that you can create / write files) through Windows Explorer may not be the same thing as verifying that it works from within Ant:
You may have specified the necessary user / password sometime in the past and Explorer remembered it (so it doesn't ask you again). Ant obviously wouldn't.
Ant may run as a different user, especially if you spawn another process inside the build.
Can you write a simple test in java and see if it can create a file on your Z: drive? Perhaps that'll provide some insight. You can also run ant with -debug switch and see if it provides a more detailed info. At the very least it would print a stack trace and you can download Ant source and see what's happening.
Just experienced the same problem. The copy target was a regular network drive connected to my Windows 7 machine.
I was able to solve the problem by restarting Eclipse.
The cause might have been that Eclipse was running with Administrator privileges because of an Eclipse update I had been performing beforehand.
Does it go without saying that the file actually exists? Regardless, while you may have permission, does the process that is actually running the ant task have permission?
you certainly thought about it, but have you tried
Z:/web/bkeller/assets/text/biography.html
I always use the / instead of \ even on Windows and can't remember having a problem with the Copy target.
It was a problem in VirtualBox's shared folder system. It was fixed a few releases ago by 3.0.X.

Categories