Trying to follow a simple "git with intellij" tutorial (in my case with bitbucket) - no chance
My First Intellij Experience
First time working with IntelliJ. I try to add version control to a just created project and add it to a remote git (bitbucket). Tried to follow several tutorials without any positive result.
I try to create a Default Spring Application with Spring Initializr -> adding Lombok, Spring Web Dependencies -> keeping everything else default. Then VCS->Enable Version Control Integration -> Choose git & ok.
I add all the files of the project to version control (since .gitignore has been generated by the project and I haven't made any changes to it or the project it should be perfect - else Intellij must be flawed in some way)
When I hit add/commit I get:
/home/benni/Documents/Spring_Projects/demo/.mvn/wrapper/MavenWrapperDownloader.java
Error:Error:line (20)Cannot resolve symbol 'Properties'
Error:Error:line (24)Cannot resolve symbol 'String'
Error:Error:line (28)Cannot resolve symbol 'String'
Error:Error:line (35)Cannot resolve symbol 'String'
Error:Error:line (41)Cannot resolve symbol 'String'
Error:Error:line (47)Cannot resolve symbol 'String'
Error:Error:line (49)Cannot resolve symbol 'String'
Warning:Warning:line (49)C-style array declaration of parameter 'args'
Error:Error:line (50)Cannot resolve symbol 'System'
Error:Error:line (51)Cannot resolve symbol 'File'
Error:Error:line (51)Cannot resolve symbol 'File'
Error:Error:line (52)Cannot resolve symbol 'System'
Error:Error:line (52)Cannot resolve method 'getAbsolutePath()'
Error:Error:line (56)Cannot resolve symbol 'File'
Error:Error:line (56)Cannot resolve symbol 'File'
Error:Error:line (57)Cannot resolve symbol 'String'
Error:Error:line (58)Cannot resolve method 'exists()'
Error:Error:line (59)Cannot resolve symbol 'FileInputStream'
Error:Error:line (61)Cannot resolve symbol 'FileInputStream'
Error:Error:line (62)Cannot resolve symbol 'Properties'
Error:Error:line (62)Cannot resolve symbol 'Properties'
Error:Error:line (63)Cannot resolve method 'load(FileInputStream)'
Error:Error:line (64)Cannot resolve method 'getProperty(String, String)'
Error:Error:line (65)Cannot resolve symbol 'IOException'
Error:Error:line (66)Cannot resolve symbol 'System'
Error:Error:line (70)Cannot resolve method 'close()'
Error:Error:line (72)Cannot resolve symbol 'IOException'
Error:Error:line (77)Cannot resolve symbol 'System'
Error:Error:line (79)Cannot resolve symbol 'File'
Error:Error:line (79)Cannot resolve symbol 'File'
Error:Error:line (79)Cannot resolve method 'getAbsolutePath()'
Error:Error:line (80)Cannot resolve method 'getParentFile()'
Error:Error:line (81)Cannot resolve method 'getParentFile()'
Error:Error:line (82)Cannot resolve symbol 'System'
Error:Error:line (83)Cannot resolve method 'getParentFile()'
Error:Error:line (86)Cannot resolve symbol 'System'
Error:Error:line (86)Cannot resolve method 'getAbsolutePath()'
Error:Error:line (89)Cannot resolve symbol 'System'
Error:Error:line (90)Cannot resolve symbol 'System'
Error:Error:line (91)Cannot resolve symbol 'Throwable'
Error:Error:line (92)Cannot resolve symbol 'System'
Error:Error:line (93)Cannot resolve method 'printStackTrace()'
Error:Error:line (94)Cannot resolve symbol 'System'
Error:Error:line (98)Cannot resolve symbol 'String'
Error:Error:line (98)Cannot resolve symbol 'File'
Error:Error:line (98)Cannot resolve symbol 'Exception'
Warning:Warning:line (98)Exception 'Exception' is never thrown in the method
Error:Error:line (99)Cannot resolve symbol 'System'
Error:Error:line (99)Cannot resolve symbol 'System'
Error:Error:line (100)Cannot resolve symbol 'String'
Error:Error:line (100)Cannot resolve symbol 'System'
Error:Error:line (101)Cannot resolve symbol 'System'
Error:Error:line (102)Cannot resolve symbol 'Authenticator'
Error:Error:line (102)Cannot resolve symbol 'Authenticator'
Error:Error:line (103)Cannot resolve symbol 'Override'
Error:Error:line (104)Cannot resolve symbol 'PasswordAuthentication'
Error:Error:line (105)Cannot resolve symbol 'PasswordAuthentication'
Error:Error:line (109)Cannot resolve symbol 'URL'
Error:Error:line (109)Cannot resolve symbol 'URL'
Error:Error:line (110)Cannot resolve symbol 'ReadableByteChannel'
Error:Error:line (111)Cannot resolve symbol 'Channels'
Error:Error:line (111)Cannot resolve method 'openStream()'
Error:Error:line (112)Cannot resolve symbol 'FileOutputStream'
Error:Error:line (112)Cannot resolve symbol 'FileOutputStream'
Error:Error:line (113)Cannot resolve method 'getChannel()'
Error:Error:line (113)Cannot resolve symbol 'Long'
Error:Error:line (114)Cannot resolve method 'close()'
Error:Error:line (115)Cannot resolve method 'close()'
When I try to add a remote repository I do the following:
Git->Manage Remotes->+->origin, url (https to test the credential thing (I also have a registered key in my bitbucket account - but not yet tested with intellij))->ok on everything-> will be added but nothing else happens (like asking for credentials).
When I just commit the despite the 66 errors and 2 warnings. When I push it will be rejected because I initialized the repo with some files (readme and stuff) therefore I do a pull and Intellij asks me in a dialog [git pull][origin][...] I add master and Intellij returns "There is no matching brach"...
Does anyone here know how to solve this issue and whether it is worth it to switch to and gui fancy thing to save time? Currently I just use vim + git + mvn + whatever tools I need from commandline?
PS.:
This warning also confuses me:
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
My /etc/environment which defines LC_ALL is set to en_GB.UTF-8 but whatever must be an IDE thing.
Please sign in to leave a comment.
I am not the only one having problems:
https://stackoverflow.com/questions/64697772/intellij-mavenwrapperdownloader-java-can-not-resolve-symbol-error
has at least one of these problems too.
Also the by Intellij generated .gitignore only includes
!.mvn/wrapper/maven-wrapper.jar
which seems to indicate that the other files under .mvn should take part in version control
Found another thread with such a problem:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010079380-MavenWrapperDownloader-java-Cannot-resolve-symbol-
Somebody in the comments solved the problem by marking the .mvn as source root
I am reluctant to do so since for one Intellij generated this stuff seems to consider this folder not to be source root, I don't know what should be part and what shouldn't be part of something classified as source root - AND WHY THE HELL IS SOMETHING AUTOGENERATED BY THE IDE NOT WORKING OUT OF THE BOX - vim never autogenerated stuff that didn't fit to the program - maybe vim knows its limits...
What is the Intellij-Way to solve this problem clean and tidy?
> by marking the .mvn as source root
Not .mvn, but the sources folder of the project itself.
May you share the screenshot of the whole IDE window with project view opened and project's tree unfolded? Leave the error opened also. Like that: