I just installed Xcode 4.2 and now can't copy a new image file to my project. It has something to do with GIT and I've pasted the error below, but I can't seem to find an answer with Google. Can someone please shed light on this?
The operation could not be performed because the file is not under version control.
I suspect that the copy failed first then you get the error about version control as a red herring, did you select to copy the file to a location that you have both permissions and space for? If so add the file yourself to your project in the file system, then add to your project, see if you still get that error.
Related
I recently downloaded LLVM-3.9 and built XCode project files for it with:
mkdir llvm-3.9.0.XCode # The .XCode in the name was probably a bad idea
cd llvm-3.9.0.XCode
cmake -G Xcode ../llvm-3.9.0.src/
The cmake then generated a valid looking XCode project files.
Then when I tried opening the project directory with XCode, I kept getting error:
Project .../llvm-3.9.0.XCode cannot be opened because it is missing its project.pbxproj file.
Apparently this error message is often the result of corrupt project files, but this is not the problem in my case. It seems this error can be shown due to different reasons. Here are some similar, but not identical questions that did not help me:
One about merge problems.
A question about where the file shoud be.
One about dropbox problems?
One where the problem seems to be corrupt project files
One where the problem was permissions
The solution I used was this:
cd llvm-3.9.0.XCode
cd LLVM.xcodeproj
open .
In other words, I navigated to the newly generated LLVM.xcodeproj with the shell
and used the system open command on that folder.
To avoid being a X-Y problem, this is what happened:
I removed all the pods from the Podfile a few days ago because I didn't need them anymore. Today, I opened up the xcworkspace and see errors. One of them is this:
diff: /../Podfile.lock: No such file or directory
So I first try to solve the issue myself. I tried pod install, pod update, and lots of other stuff. They all didn't work. So I thought, FINE! I'll delete all the cocoapod-related stuff and start from scratch again! And so I did. But the problem is still there.
Then I downloaded the whole project from github and deleted the broken one. I tried updating cocoapods to the newest version and pod install, everything is working in the downloaded project.
After that, I found out that github is not tracking the changes of the downloaded project. It is still tracking the changes of the project in the trash.
I need to find a way to change the project that github is currently tracking to the downloaded project. How do I do this?
P.S. I am an absolute noob of command line interfaces. I cannot remember all those git commands. So if someone can show the solution both using the github (Mac) app and the CLI, it would be greatly appreciated.
I solved this problem with this:
Create a temp folder
Move all the stuff in the downloaded project's project folder to the temp folder
Delete the downloaded project's project folder, which is now empty
Move the deleted project from trash to the original position i.e. "Put Back"
Delete the contents of the original project folder
Move the stuff in the temp folder into the original project folder, which is now empty
Profit!
You might have to add the newly downloaded copy to the SourceTree.
here are the steps -
SourceTree --> New Repository --> Add existing Local Repo --> Then in the finder window locate the newly downloaded repo.
Now I believe you can see the changes of the new project and commit as well. PFA screenshot.
When I try to export a signed copy of my application from the Archives screen, I get the following error.
I used find . -type l ls to find symlinks in my project directory: there are none. I went to the Xcode/Archives folder for this archive and searched for symlinks there, and there are some but none of them are in the DevMateKit.framework mentioned in the error message. I've also tried adding a build step to manually delete the second binary, but it doesn't help.
The code signing is being done automatically by Xcode, and the files are being copied through a standard Copy Files task. There is also one manual piece of code signing, done through a Run Script task, which manually codesigns a different framework to the one in the error message (although I can't see how that would be relevant). My Xcode version is 6.3.1.
Any suggestions?
If you are using DevMateKit v1.1.1 or less, check your 'Link Binary With Libraries' build phase and phase where you are copying frameworks and remove DevMateIssuesReporter.framework from the list if it's present there. If it won't help, just contact DevMate support with this problem or create a new issue with GitHub (https://github.com/DevMate/DevMateKit)
OK, so I believe the reason this happens is as follows. The DevMateKit.framework is pre-codesigned by the developer. But I suspect that their source has symlinks in it, and they have signed it all in such a way that this error occurs, but when packaging the framework for download have removed the symlinks so it appears there is nothing that code be done.
I experimented with signing the code myself, which I think would work, but after some experimentation decided to simply delete the binaries that are directly inside any CrashReporter.framework directory, and leave the ones inside any CrashReporter.framework/Versions/.../ directory. This removes the duplicated binaries and appears to work perfectly.
But I'm not an expert on this process, so it's entirely possible that I was just doing something wrong.
I had a file which I deleted and replaced with another file, somewhere else, of the same name.
Despite cleaning, and trying this multiple times, I keep getting this error:
clang: error: no such file or directory: '/Users/Andrew/App/Version 1.1/XCode/UIImage+Alpha.m'
clang: error: no input files
I can't continue working on my app because of it. Any ideas?
The problem might be because your project > target > Build Phases > Compile Sources is trying to compile a file that doesn't exist. It might be in there twice, like the below screen shot. My project contains UIImage+FFXtras, I can even remove it and re-add it and this won't resolve the problem!
I'm not sure how the project gets into this state - but I know it's not obvious what is going wrong. Highlight the red problem one and remove it.
So have a look in compile sources phase for the file clang is complaining about.
Got the similar troubles.
It seems XCode does not generate correct relative filepath when your project refer to an already existing source tree (relative path does not contain the .xcodeproj in the path of the file to be compiled).
There is a simple fix however: in the project explorer select the file or files files then look at the options in the file inspector. One of them is labeled "Location"; set it to absolut path and try again. This fixed the issue for me :)
Additional to all answers:
delete derived data
reboot
delete derived data
clean
build
Success!
Only this sequence works for me in my case.
I use quite a few cocoa pods and have just had this happen to me. A quick "pods update" sorted things out for me. -phil
If you are using vs code and facing this issue which says
clang: error: no such file or directory: 'filename'
clang: error: no input files
Error while running files:
I solved this issue by removing the space or replacing the space with underscore(_) in the filename .extension
In case everything fails (i.e. first try bames53 suggestion)
Ok, this might be dangerous so make a copy of your whole project first:
close Xcode
locate the project file in the Finder
right click, choose "show package contents"
open project.pbxproj in a text editor of your choice, but not Xcode
search for your file
at the beginning of the line that shows up, you'll see some id like 640450991409CF5C00B3B580. Search for this and delete any line you find.
pay attention, not to break the syntax (balance parenthesis and brackets, pay attention for commas)
when you are done, save the file and try to open the project in Xcode. Add the missing file via the Add file… dialog of Xcode. It is still in the folder of your project — if you added it successfully in the first place — you just got rid of all project references.
dont be surprised, if it doesnt work instantly — you have a copy. copy it again, new try.
And remember: make a copy of your whole project first — for every try. or copying the project.pbxproj might be enough.
Add this line in your pod-file and run pod install:
use_frameworks!
I had this error in monodevelop. I just went to edit>preferences
and changed the default location of the program files. It was set to the monodevelop default they give you when you open a file and not the folder i changed it too.
Likely, you need to adjust the settings of xcode, where you stored your files.
I was seeing this while setting up a React Native project. Solved it using:
sudo xcode-select --switch /Applications/Xcode.app
Source
Comment Quoted from another site was the issue is resolved for me
hmm that's strange. Try this - click on the name of your project on the list of files/folders on the left in Xcode (at the very top of the list). Look at the "Targets" section on the left-hand side of the window to the right. Likely, there's two listed with the second being a "test" item. Right-click on that item and select "delete". Then try to run the project again. See screenshot below for a visual cue.
How to fix building workspace problem in Zend Studio?
I'm trying to rename project and rename folder of project, however nothing:
Errors occurred during the build.
Errors running builder 'JavaScript
Validator' on project 'PROJECT'.
java.lang.NullPointerException
you must go to Project->Properties->Builders then disable ‘Javascript Validator’.
The bug has been fixed, you can either wait for the new release or apply the patch :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=318004
I had similar problem and mine is that the saving workspace process try to write in one of the file and it can't even it is available under .metadata directory.
This is how I did:
Open the .metadata directory and look for that particular file, yours can be different, so
change it to read and write for this file then restart eclipse.
It fixed the problem!.
My OS: Ubuntu 10.04 , Eclipse SDK 3.5.2
Hope this help...