Cannot Resolve Symbol Error In Intellij
Contents |
here for a quick overview of the site Help Center Detailed answers intellij cannot resolve symbol gradle to any questions you might have Meta Discuss the workings
Intellij Cannot Resolve Symbol String
and policies of this site About Us Learn more about Stack Overflow the company Business
Intellij Cannot Resolve Symbol Servlet
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack
Intellij Cannot Resolve Symbol Springframework
Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up IntelliJ inspection gives “Cannot resolve symbol” but still compiles code up vote 198 down vote favorite 56 Platform: IntelliJ Community Edition 10.0.3 SDK: jdk1.6.0_21 intellij cannot resolve symbol groovy OS: Windows 7 So I have a strange situation with IntelliJ that has me completely stumped. I setup a Maven project and add log4j as a dependency in the pom.xml file. The IDEA inspections run fine and my unit tests all compile and run. I then added hunnysoft's jmime library to my local maven repository using the mvn install:install-file as follows. mvn install:install-file -Dfile=jmime.jar -DgroupId=jmime \ -DartifactId=jmime -Dversion=3.1.1e -Dpackaging=jar Maven installed the jar file just fine into my local repository. I then went into IntelliJ's Settings => Maven => Repository Services and Updated my local repository (so that IntelliJ would reindex the repository contents). Finally, I added the following dependency to my pom.xml file (just above the log4j dependency).
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn intellij cannot resolve symbol play more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags intellij cannot resolve symbol r Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, intellij cannot resolve symbol junit helping each other. Join them; it only takes a minute: Sign up IntellJ IDEA “cannot resolve symbol” and “cannot resolve method” up vote 28 down vote favorite 4 What are common causes for IntelliJ IDEA not being able http://stackoverflow.com/questions/5905896/intellij-inspection-gives-cannot-resolve-symbol-but-still-compiles-code to resolve built-in JVM types and methods? For example, when I mouse over String the tooltip says "Cannot resolve symbol 'String'". It's as if IntelliJ has doesn't know where the JVM is. By the way, I am running OS X 10.6.6. Everything was working fine until I ran the system update this morning. intellij-idea share|improve this question asked Jan 6 '11 at 19:13 Landon Kuhn 20k3381112 youtrack.jetbrains.com/issue/IDEA-95789 –sorin Nov 25 '12 at 12:17 http://stackoverflow.com/questions/4618794/intellj-idea-cannot-resolve-symbol-and-cannot-resolve-method possible duplicate of IntelliJ IDEA JDK configuration on Mac OS –random Oct 13 '13 at 18:21 add a comment| 2 Answers 2 active oldest votes up vote 31 down vote accepted Most likely JDK configuration is not valid, try to remove and add the JDK again as I've described in the related question here. share|improve this answer answered Jan 6 '11 at 19:20 CrazyCoder 177k30462415 Thank you, brotha –Alexander.Iljushkin Nov 29 '13 at 11:03 add a comment| up vote 2 down vote First check if you have configured JDK correctly: Go to File->Project Structure -> SDKs your JDK home path should be something like this: /Library/Java/JavaVirtualMachine/jdk.1.7.0_79.jdk/Contents/Home Hit Apply and then OK Secondly check if you have provided in path in Library's section Go to File->Project Structure -> Libraries Hit the + button Add the path to your src folder Hit Apply and then OK This should fix the problem share|improve this answer answered Sep 28 '15 at 3:03 user4660857 312 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions
build 2233 on Mac OS X.3.4 with JDK 1.4.2_03 claims it can't resolve even basic java.lang symbols. Everything compiles fine and runs fine under IDEA but the bulb keeps suggesting I create a class or interface called https://intellij-support.jetbrains.com/hc/en-us/community/posts/207039495-Cannot-resolve-symbol-String-?sort_by=votes 'String'. I've double-checked the JDK and library settings as well as the project JDK setting and they appear to be fine. I tried creating a trivial project and get the same error. No errors are showing up http://peterpants.blogspot.com/2011/04/intellij-idea-frustrations-with-cannot.html in console.Anyone else experience this? I'm convinced it's some incorrect setting but can't seem to find it for the life of me. Facebook Twitter LinkedIn Google+ Date Votes 11 comments 0 ANONYMOUS July 30, 2004 14:13 Sean cannot resolve Chou wrote: this? I'm convinced it's some incorrect setting but can't seem to find it for the life of me.I'd start from Settings|Paths|Libraries|JDK-- Maxim ShafirovIntelliJ Labs / JetBrains Inc.http://www.intellij.com"Develop with pleasure!" 0 Sean Chou July 30, 2004 14:31 That's what I meant when I said I specified the project JDK. I double checked it just in case and it's set to JDK 1.4.2_3 which, in turn, is pointing to /Library/Java/Home under the IDE Settings/JDK&Global Libraries.I cannot resolve symbol added other Jars to the project and those classes seem to get picked up. 0 Alex Kozlenkov July 30, 2004 19:22 Hi,I had the same problem when I wanted to use Java 1.5 Beta 2 installed into a non-default directory. After re-installing it (on Windows) where it wanted to go (under C:\Program Files\Java) and choosing jdk1.5.0, the problem went away.Cheers, Alex 0 ANONYMOUS July 30, 2004 19:37 Sean Chou wrote:That's what I meant when I said I specified the project JDK. I double checked it just in case and it's set to JDK 1.4.2_3 which, in turn, is pointing to /Library/Java/Home under the IDE Settings/JDK&Global Libraries.I added other Jars to the project and those classes seem to get picked up.If you're on Mac the JDK point should look like follows: /System/Library/Frameworks/JavaVM.framework/Home-- Maxim ShafirovIntelliJ Labs / JetBrains Inc.http://www.intellij.com"Develop with pleasure!" 0 Sean Chou August 04, 2004 03:47 Still no luck. I'm wondering if my system is brain damaged... 0 ANONYMOUS August 04, 2004 04:01 Sean Chou wrote:>Still no luck. I'm wondering if my system is brain damaged... >I usually see that when the configured JDK is no longer valid ( newer JDK installed and the paths no longer valid ).Check that... 0 ANONYMOUS August 04, 2004 04:26 Also check that a valid JDK is defined for each module in your project.Sean Ch
power developers are using. I'm pretty sold on NetBeans myself. Its pretty, it works every time, its really intuitive and easy to use, it does the task at hand without cluttering me down with loads of crap. My initial impressions of IntelliJ IDEA are that, I need to force myself to enjoy using it. Hopefully my obstacles to using IDEA will be resolved so I too can get with the program. In this post I'll shed some light on solving a big nasty roadblock I ran into with IDEA. The Problem: IDEA doesn't know what Java is. My first sign that something is very wrong: IntelliJ IDEA Cannot resolve symbol 'String' IntelliJ becomes very annoying when it can't find the JDK. It will however prompt me every 10 seconds, that it recommends me to use org.apache.xpath.operations.String, instead of Java's in-built String. It will recommend me a whole crapload of things, such as detecting Spring, wanting to add IDEA project files to the git repository, but it won't detect that I don't have a JDK set. The nail in the coffin: IDEA: Cannot resolve symbol 'java' This does wonders for programmer happiness, in fact, IDEA actually made me frustrated. Even though IDEA was the only IDE that had a certain feature that would be its selling point for me, all of that erases when it doesn't know what Java is, and doesn't give me Code Completion for String. The Fix:Properly set the IDEA Platform JDK for your project/module. Go to Project Structure (Ctrl+Alt+Shift+A), and ensure that Platform Settings[SDK's] has your path for Java set, in my case /usr/lib/jvm/java-6-sun, and then the main fix:Set the Project Settings[Project] --> Project SDK to your current JDK. I had mine set to none for the project I was working on. Therefore, no java, no string, no primitive types, no nothing. Once you set that, it should kick off a reindex, and your project will have full Java support. I suppose during the install of IDEA, it didn't detect Java from the usual places, and decided not to ask me. Sorry if this is a ranty post, but an uncooperative IDE is almost as bad as code thats not doing what you're intending it to. Labels: code 22 comment